Skip to content

Commit 39271f7

Browse files
committed
Auto merge of #116260 - matthiaskrgr:rollup-q3sge0i, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #116133 (ref(bootstrap.py): add `eprint` function) - #116201 (Fix `noop_method_call` detection) - #116231 (Remove `rustc_lint_defs::lint_array`) - #116234 (Miri subtree update) - #116239 (Only visit reachable nodes in SsaLocals.) - #116245 (Clippy backport: Move needless_raw_string_hashes to pedantic) - #116253 (Make `adt_const_params` feature suggestion consistent with other features and improve when it is emitted) r? `@ghost` `@rustbot` modify labels: rollup
2 parents af6a7af + 54f256f commit 39271f7

File tree

113 files changed

+228
-72
lines changed

Some content is hidden

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

113 files changed

+228
-72
lines changed

Cargo.lock

Lines changed: 114 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ libloading = "0.7"
3636

3737
[dev-dependencies]
3838
colored = "2"
39-
ui_test = "0.11.7"
39+
ui_test = "0.21.1"
4040
rustc_version = "0.4"
4141
# Features chosen to match those required by env_logger, to avoid rebuilds
4242
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ Moreover, Miri recognizes some environment variables:
478478
* `MIRI_TEST_TARGET` (recognized by the test suite and the `./miri` script) indicates which target
479479
architecture to test against. `miri` and `cargo miri` accept the `--target` flag for the same
480480
purpose.
481+
* `MIRI_TEST_THREADS` (recognized by the test suite): set the number of threads to use for running tests.
482+
By default the number of cores is used.
481483
* `MIRI_NO_STD` (recognized by `cargo miri` and the test suite) makes sure that the target's
482484
sysroot is built without libstd. This allows testing and running no_std programs.
483485
* `RUSTC_BLESS` (recognized by the test suite and `cargo-miri-test/run-test.py`): overwrite all

bench-cargo-miri/invalidate/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "invalidate"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
// The end of the range is just chosen to make the benchmark run for a few seconds.
3+
for _ in 0..200_000 {}
4+
}

cargo-miri/src/phases.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_version::VersionMeta;
1010

1111
use crate::{setup::*, util::*};
1212

13-
const CARGO_MIRI_HELP: &str = r#"Runs binary crates and tests in Miri
13+
const CARGO_MIRI_HELP: &str = r"Runs binary crates and tests in Miri
1414
1515
Usage:
1616
cargo miri [subcommand] [<cargo options>...] [--] [<program/test suite options>...]
@@ -31,7 +31,7 @@ Examples:
3131
This will print the path to the generated sysroot (and nothing else) on stdout.
3232
stderr will still contain progress information about how the build is doing.
3333
34-
"#;
34+
";
3535

3636
fn show_help() {
3737
println!("{CARGO_MIRI_HELP}");

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
42ca6e4e5760a548a6fa858482de6d237f6fb3b8
1+
2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e

src/borrow_tracker/stacked_borrows/diagnostics.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use smallvec::SmallVec;
22
use std::fmt;
33

4+
use rustc_data_structures::fx::FxHashSet;
45
use rustc_middle::mir::interpret::{alloc_range, AllocId, AllocRange, InterpError};
56
use rustc_span::{Span, SpanData};
67
use rustc_target::abi::Size;
@@ -233,6 +234,12 @@ impl AllocHistory {
233234
protectors: SmallVec::new(),
234235
}
235236
}
237+
238+
pub fn retain(&mut self, live_tags: &FxHashSet<BorTag>) {
239+
self.invalidations.retain(|event| live_tags.contains(&event.tag));
240+
self.creations.retain(|event| live_tags.contains(&event.retag.new_tag));
241+
self.protectors.retain(|event| live_tags.contains(&event.tag));
242+
}
236243
}
237244

238245
impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {

src/borrow_tracker/stacked_borrows/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ impl Stacks {
456456
stack.retain(live_tags);
457457
}
458458
}
459+
self.history.retain(live_tags);
459460
self.modified_since_last_gc = false;
460461
}
461462
}

0 commit comments

Comments
 (0)