Update miri, cargo-miri and miri-cript to edition 2024
Also update the format edition to 2024
This commit is contained in:
parent
4b8f88b251
commit
070fee2df3
8 changed files with 11 additions and 12 deletions
|
|
@ -6,7 +6,7 @@ name = "miri"
|
|||
repository = "https://github.com/rust-lang/miri"
|
||||
version = "0.1.0"
|
||||
default-run = "miri"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[lib]
|
||||
test = true # we have unit tests
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0"
|
|||
name = "cargo-miri"
|
||||
repository = "https://github.com/rust-lang/miri"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
name = "cargo-miri"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ name = "miri-script"
|
|||
repository = "https://github.com/rust-lang/miri"
|
||||
version = "0.1.0"
|
||||
default-run = "miri-script"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[workspace]
|
||||
# We make this a workspace root so that cargo does not go looking in ../Cargo.toml for the workspace root.
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ impl MiriEnv {
|
|||
let toolchain = &self.toolchain;
|
||||
let mut cmd = cmd!(
|
||||
self.sh,
|
||||
"rustfmt +{toolchain} --edition=2021 --config-path {config_path} --unstable-features --skip-children {flags...}"
|
||||
"rustfmt +{toolchain} --edition=2024 --config-path {config_path} --unstable-features --skip-children {flags...}"
|
||||
);
|
||||
if first {
|
||||
// Log an abbreviating command, and only once.
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ fn jemalloc_magic() {
|
|||
// linking, so we need to explicitly depend on the function.
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
extern "C" {
|
||||
unsafe extern "C" {
|
||||
fn _rjem_je_zone_register();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ impl NodeDebugInfo {
|
|||
/// Add a name to the tag. If a same tag is associated to several pointers,
|
||||
/// it can have several names which will be separated by commas.
|
||||
pub fn add_name(&mut self, name: &str) {
|
||||
if let Some(ref mut prev_name) = &mut self.name {
|
||||
if let Some(prev_name) = &mut self.name {
|
||||
prev_name.push_str(", ");
|
||||
prev_name.push_str(name);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -648,8 +648,7 @@ impl<'tcx> MiriMachine<'tcx> {
|
|||
AccessedAlloc(AllocId(id), access_kind) =>
|
||||
format!("{access_kind} to allocation with id {id}"),
|
||||
FreedAlloc(AllocId(id)) => format!("freed allocation with id {id}"),
|
||||
RejectedIsolatedOp(ref op) =>
|
||||
format!("{op} was made to return an error due to isolation"),
|
||||
RejectedIsolatedOp(op) => format!("{op} was made to return an error due to isolation"),
|
||||
ProgressReport { .. } =>
|
||||
format!("progress report: current operation being executed is here"),
|
||||
Int2Ptr { .. } => format!("integer-to-pointer cast"),
|
||||
|
|
|
|||
|
|
@ -183,18 +183,18 @@ fn basic() {
|
|||
|
||||
fn smoke_resume_arg() {
|
||||
fn drain<G: Coroutine<R, Yield = Y> + Unpin, R, Y>(
|
||||
gen: &mut G,
|
||||
gen_: &mut G,
|
||||
inout: Vec<(R, CoroutineState<Y, G::Return>)>,
|
||||
) where
|
||||
Y: Debug + PartialEq,
|
||||
G::Return: Debug + PartialEq,
|
||||
{
|
||||
let mut gen = Pin::new(gen);
|
||||
let mut gen_ = Pin::new(gen_);
|
||||
|
||||
for (input, out) in inout {
|
||||
assert_eq!(gen.as_mut().resume(input), out);
|
||||
assert_eq!(gen_.as_mut().resume(input), out);
|
||||
// Test if the coroutine is valid (according to type invariants).
|
||||
let _ = unsafe { ManuallyDrop::new(ptr::read(gen.as_mut().get_unchecked_mut())) };
|
||||
let _ = unsafe { ManuallyDrop::new(ptr::read(gen_.as_mut().get_unchecked_mut())) };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue