Skip to content

Commit 5502a85

Browse files
committed
Fix clippy warning
1 parent 3b7ee43 commit 5502a85

File tree

3 files changed

+45
-9
lines changed

3 files changed

+45
-9
lines changed

Cargo.lock

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ dependencies = [
8181
"unicode-width",
8282
]
8383

84+
[[package]]
85+
name = "getrandom"
86+
version = "0.3.3"
87+
source = "registry+https://github.com/rust-lang/crates.io-index"
88+
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
89+
dependencies = [
90+
"cfg-if",
91+
"libc",
92+
"r-efi",
93+
"wasi",
94+
]
95+
8496
[[package]]
8597
name = "hermit-abi"
8698
version = "0.3.1"
@@ -111,9 +123,9 @@ checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
111123

112124
[[package]]
113125
name = "linux-raw-sys"
114-
version = "0.4.14"
126+
version = "0.9.4"
115127
source = "registry+https://github.com/rust-lang/crates.io-index"
116-
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
128+
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
117129

118130
[[package]]
119131
name = "memchr"
@@ -137,6 +149,12 @@ version = "1.20.2"
137149
source = "registry+https://github.com/rust-lang/crates.io-index"
138150
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
139151

152+
[[package]]
153+
name = "r-efi"
154+
version = "5.2.0"
155+
source = "registry+https://github.com/rust-lang/crates.io-index"
156+
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
157+
140158
[[package]]
141159
name = "regex"
142160
version = "1.8.4"
@@ -166,9 +184,9 @@ dependencies = [
166184

167185
[[package]]
168186
name = "rustix"
169-
version = "0.38.42"
187+
version = "1.0.7"
170188
source = "registry+https://github.com/rust-lang/crates.io-index"
171-
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
189+
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
172190
dependencies = [
173191
"bitflags",
174192
"errno",
@@ -188,12 +206,12 @@ dependencies = [
188206

189207
[[package]]
190208
name = "tempfile"
191-
version = "3.14.0"
209+
version = "3.20.0"
192210
source = "registry+https://github.com/rust-lang/crates.io-index"
193-
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
211+
checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"
194212
dependencies = [
195-
"cfg-if",
196213
"fastrand",
214+
"getrandom",
197215
"once_cell",
198216
"rustix",
199217
"windows-sys",
@@ -242,6 +260,15 @@ dependencies = [
242260
"winapi-util",
243261
]
244262

263+
[[package]]
264+
name = "wasi"
265+
version = "0.14.2+wasi-0.2.4"
266+
source = "registry+https://github.com/rust-lang/crates.io-index"
267+
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
268+
dependencies = [
269+
"wit-bindgen-rt",
270+
]
271+
245272
[[package]]
246273
name = "winapi"
247274
version = "0.3.9"
@@ -345,3 +372,12 @@ name = "windows_x86_64_msvc"
345372
version = "0.52.6"
346373
source = "registry+https://github.com/rust-lang/crates.io-index"
347374
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
375+
376+
[[package]]
377+
name = "wit-bindgen-rt"
378+
version = "0.39.0"
379+
source = "registry+https://github.com/rust-lang/crates.io-index"
380+
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
381+
dependencies = [
382+
"bitflags",
383+
]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ gccjit = "2.7"
3131
[dev-dependencies]
3232
boml = "0.3.1"
3333
lang_tester = "0.8.0"
34-
tempfile = "3.7.1"
34+
tempfile = "3.20.0"
3535

3636
[profile.dev]
3737
# By compiling dependencies with optimizations, performing tests gets much faster.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl CodegenBackend for GccCodegenBackend {
207207
// NOTE: try the LTO frontend and check if it errors out. If so, do not embed the bitcode.
208208
{
209209
let temp_dir = TempDir::new().expect("cannot create temporary directory");
210-
let temp_file = temp_dir.into_path().join("result.asm");
210+
let temp_file = temp_dir.keep().join("result.asm");
211211
let context = Context::default();
212212
let object_file_path = temp_file.to_str().expect("path to str");
213213
context.compile_to_file(gccjit::OutputKind::ObjectFile, object_file_path);

0 commit comments

Comments
 (0)