Skip to content

Commit 8ed95d1

Browse files
committed
Auto merge of rust-lang#130709 - RalfJung:miri-sync, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 0af7f0f + 599b329 commit 8ed95d1

File tree

86 files changed

+2200
-2149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2200
-2149
lines changed

src/tools/miri/.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
schedule:
1313
- cron: '44 4 * * *' # At 4:44 UTC every day.
1414

15+
permissions:
16+
contents: write
17+
1518
defaults:
1619
run:
1720
shell: bash

src/tools/miri/miri-script/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::env;
22
use std::iter;
33

4-
use anyhow::{bail, Result};
4+
use anyhow::{Result, bail};
55

66
pub struct Args {
77
args: iter::Peekable<env::Args>,

src/tools/miri/miri-script/src/commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use std::path::PathBuf;
88
use std::process;
99
use std::time::Duration;
1010

11-
use anyhow::{anyhow, bail, Context, Result};
11+
use anyhow::{Context, Result, anyhow, bail};
1212
use path_macro::path;
1313
use walkdir::WalkDir;
14-
use xshell::{cmd, Shell};
14+
use xshell::{Shell, cmd};
1515

16-
use crate::util::*;
1716
use crate::Command;
17+
use crate::util::*;
1818

1919
/// Used for rustc syncs.
2020
const JOSH_FILTER: &str =

src/tools/miri/miri-script/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod util;
66

77
use std::ops::Range;
88

9-
use anyhow::{anyhow, bail, Context, Result};
9+
use anyhow::{Context, Result, anyhow, bail};
1010

1111
#[derive(Clone, Debug)]
1212
pub enum Command {

src/tools/miri/miri-script/src/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use std::path::{Path, PathBuf};
55
use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};
66
use std::{env, iter, thread};
77

8-
use anyhow::{anyhow, bail, Context, Result};
8+
use anyhow::{Context, Result, anyhow, bail};
99
use dunce::canonicalize;
1010
use path_macro::path;
11-
use xshell::{cmd, Cmd, Shell};
11+
use xshell::{Cmd, Shell, cmd};
1212

1313
pub fn miri_dir() -> std::io::Result<PathBuf> {
1414
const MIRI_SCRIPT_ROOT_DIR: &str = env!("CARGO_MANIFEST_DIR");

src/tools/miri/rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e2dc1a1c0f97a90319181a721ab317210307617a
1+
6ce376774c0bc46ac8be247bca93ff5a1287a8fc

src/tools/miri/rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "Two"
1+
style_edition = "2024"
22
use_small_heuristics = "Max"
33
match_arm_blocks = false
44
match_arm_leading_pipes = "Preserve"

src/tools/miri/src/alloc_addresses/reuse_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rand::Rng;
44

55
use rustc_target::abi::{Align, Size};
66

7-
use crate::{concurrency::VClock, MemoryKind, MiriConfig, ThreadId};
7+
use crate::{MemoryKind, MiriConfig, ThreadId, concurrency::VClock};
88

99
const MAX_POOL_SIZE: usize = 64;
1010

src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ use std::mem;
1212

1313
use rustc_data_structures::fx::FxHashSet;
1414
use rustc_middle::mir::{Mutability, RetagKind};
15-
use rustc_middle::ty::{self, layout::HasParamEnv, Ty};
15+
use rustc_middle::ty::{self, Ty, layout::HasParamEnv};
1616
use rustc_target::abi::{Abi, Size};
1717

1818
use crate::borrow_tracker::{
19-
stacked_borrows::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder},
2019
GlobalStateInner, ProtectorKind,
20+
stacked_borrows::diagnostics::{AllocHistory, DiagnosticCx, DiagnosticCxBuilder},
2121
};
2222
use crate::concurrency::data_race::{NaReadType, NaWriteType};
2323
use crate::*;
@@ -913,11 +913,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
913913
new_perm: NewPermission,
914914
) -> InterpResult<'tcx> {
915915
let val = self.ecx.read_immediate(&self.ecx.place_to_op(place)?)?;
916-
let val = self.ecx.sb_retag_reference(
917-
&val,
918-
new_perm,
919-
RetagInfo { cause: self.retag_cause, in_field: self.in_field },
920-
)?;
916+
let val = self.ecx.sb_retag_reference(&val, new_perm, RetagInfo {
917+
cause: self.retag_cause,
918+
in_field: self.in_field,
919+
})?;
921920
self.ecx.write_immediate(*val, place)?;
922921
Ok(())
923922
}
@@ -1003,11 +1002,10 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
10031002
access: Some(AccessKind::Write),
10041003
protector: Some(ProtectorKind::StrongProtector),
10051004
};
1006-
this.sb_retag_place(
1007-
place,
1008-
new_perm,
1009-
RetagInfo { cause: RetagCause::InPlaceFnPassing, in_field: false },
1010-
)
1005+
this.sb_retag_place(place, new_perm, RetagInfo {
1006+
cause: RetagCause::InPlaceFnPassing,
1007+
in_field: false,
1008+
})
10111009
}
10121010

10131011
/// Mark the given tag as exposed. It was found on a pointer with the given AllocId.

src/tools/miri/src/borrow_tracker/stacked_borrows/stack.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use std::ops::Range;
44
use rustc_data_structures::fx::FxHashSet;
55
use tracing::trace;
66

7+
use crate::ProvenanceExtra;
78
use crate::borrow_tracker::{
8-
stacked_borrows::{Item, Permission},
99
AccessKind, BorTag,
10+
stacked_borrows::{Item, Permission},
1011
};
11-
use crate::ProvenanceExtra;
1212

1313
/// Exactly what cache size we should use is a difficult trade-off. There will always be some
1414
/// workload which has a `BorTag` working set which exceeds the size of the cache, and ends up

0 commit comments

Comments
 (0)