Skip to content

Commit 0be36da

Browse files
committed
tidy: move to edition 2024
1 parent 420dfeb commit 0be36da

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/tools/tidy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tidy"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"
55
autobins = false
66

77
[dependencies]

src/tools/tidy/src/main.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ use std::{env, process};
1515
use tidy::*;
1616

1717
fn main() {
18-
// Running Cargo will read the libstd Cargo.toml
18+
// Enable nightly, because Cargo will read the libstd Cargo.toml
1919
// which uses the unstable `public-dependency` feature.
20-
//
21-
// `setenv` might not be thread safe, so run it before using multiple threads.
22-
env::set_var("RUSTC_BOOTSTRAP", "1");
20+
// SAFETY: no other threads have been spawned
21+
unsafe {
22+
env::set_var("RUSTC_BOOTSTRAP", "1");
23+
}
2324

2425
let root_path: PathBuf = env::args_os().nth(1).expect("need path to root of repo").into();
2526
let cargo: PathBuf = env::args_os().nth(2).expect("need path to cargo").into();

0 commit comments

Comments
 (0)