Skip to content

Commit f4c23fd

Browse files
committed
Update to edition 2024
1 parent 4632c61 commit f4c23fd

File tree

21 files changed

+24
-25
lines changed

21 files changed

+24
-25
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name = "miri"
66
repository = "https://github.com/rust-lang/miri"
77
version = "0.1.0"
88
default-run = "miri"
9-
edition = "2021"
9+
edition = "2024"
1010

1111
[lib]
1212
test = true # we have unit tests

bench-cargo-miri/backtraces/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/big-allocs/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/range-iteration/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/slice-chunked/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/slice-get-unchecked/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/string-replace/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/unicode/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

bench-cargo-miri/zip-equal/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

cargo-miri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0"
55
name = "cargo-miri"
66
repository = "https://github.com/rust-lang/miri"
77
version = "0.1.0"
8-
edition = "2021"
8+
edition = "2024"
99

1010
[[bin]]
1111
name = "cargo-miri"

miri-script/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name = "miri-script"
66
repository = "https://github.com/rust-lang/miri"
77
version = "0.1.0"
88
default-run = "miri-script"
9-
edition = "2021"
9+
edition = "2024"
1010

1111
[workspace]
1212
# We make this a workspace root so that cargo does not go looking in ../Cargo.toml for the workspace root.

miri-script/src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ impl Command {
682682
}
683683
}
684684
early_flags.push("--edition".into());
685-
early_flags.push(edition.as_deref().unwrap_or("2021").into());
685+
early_flags.push(edition.as_deref().unwrap_or("2024").into());
686686
early_flags.push("--sysroot".into());
687687
early_flags.push(miri_sysroot.into());
688688

miri-script/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl MiriEnv {
213213
let toolchain = &self.toolchain;
214214
let mut cmd = cmd!(
215215
self.sh,
216-
"rustfmt +{toolchain} --edition=2021 --config-path {config_path} --unstable-features --skip-children {flags...}"
216+
"rustfmt +{toolchain} --edition=2024 --config-path {config_path} --unstable-features --skip-children {flags...}"
217217
);
218218
if first {
219219
// Log an abbreviating command, and only once.

src/bin/miri.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ fn jemalloc_magic() {
459459
// linking, so we need to explicitly depend on the function.
460460
#[cfg(target_os = "macos")]
461461
{
462-
extern "C" {
462+
unsafe extern "C" {
463463
fn _rjem_je_zone_register();
464464
}
465465

src/borrow_tracker/tree_borrows/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl NodeDebugInfo {
179179
/// Add a name to the tag. If a same tag is associated to several pointers,
180180
/// it can have several names which will be separated by commas.
181181
pub fn add_name(&mut self, name: &str) {
182-
if let Some(ref mut prev_name) = &mut self.name {
182+
if let Some(prev_name) = &mut self.name {
183183
prev_name.push_str(", ");
184184
prev_name.push_str(name);
185185
} else {

src/diagnostics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,7 @@ impl<'tcx> MiriMachine<'tcx> {
648648
AccessedAlloc(AllocId(id), access_kind) =>
649649
format!("{access_kind} to allocation with id {id}"),
650650
FreedAlloc(AllocId(id)) => format!("freed allocation with id {id}"),
651-
RejectedIsolatedOp(ref op) =>
652-
format!("{op} was made to return an error due to isolation"),
651+
RejectedIsolatedOp(op) => format!("{op} was made to return an error due to isolation"),
653652
ProgressReport { .. } =>
654653
format!("progress report: current operation being executed is here"),
655654
Int2Ptr { .. } => format!("integer-to-pointer cast"),

test-cargo-miri/no-std-smoke/Cargo.toml

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

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[package]
22
name = "test-local-crate-detection"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2024"

test_dependencies/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0"
55
name = "miri-test-deps"
66
repository = "https://github.com/rust-lang/miri"
77
version = "0.1.0"
8-
edition = "2021"
8+
edition = "2024"
99

1010
[dependencies]
1111
# all dependencies (and their transitive ones) listed here can be used in `tests/*-dep`.

tests/pass/coroutine.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,18 @@ fn basic() {
183183

184184
fn smoke_resume_arg() {
185185
fn drain<G: Coroutine<R, Yield = Y> + Unpin, R, Y>(
186-
gen: &mut G,
186+
gen_: &mut G,
187187
inout: Vec<(R, CoroutineState<Y, G::Return>)>,
188188
) where
189189
Y: Debug + PartialEq,
190190
G::Return: Debug + PartialEq,
191191
{
192-
let mut gen = Pin::new(gen);
192+
let mut gen_ = Pin::new(gen_);
193193

194194
for (input, out) in inout {
195-
assert_eq!(gen.as_mut().resume(input), out);
195+
assert_eq!(gen_.as_mut().resume(input), out);
196196
// Test if the coroutine is valid (according to type invariants).
197-
let _ = unsafe { ManuallyDrop::new(ptr::read(gen.as_mut().get_unchecked_mut())) };
197+
let _ = unsafe { ManuallyDrop::new(ptr::read(gen_.as_mut().get_unchecked_mut())) };
198198
}
199199
}
200200

tests/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn miri_config(
126126
stdout_filters().iter().map(|(m, p)| (m.clone(), p.to_vec())).collect();
127127

128128
// keep in sync with `./miri run`
129-
config.comment_defaults.base().add_custom("edition", Edition("2021".into()));
129+
config.comment_defaults.base().add_custom("edition", Edition("2024".into()));
130130

131131
if let Some(WithDependencies { bless }) = with_dependencies {
132132
config.comment_defaults.base().set_custom(

0 commit comments

Comments
 (0)