Skip to content

Commit 11da9e9

Browse files
authored
Unrolled build for rust-lang#116234
Rollup merge of rust-lang#116234 - RalfJung:miri, r=RalfJung Miri subtree update r? `@ghost`
2 parents b8536c1 + e0f4ab8 commit 11da9e9

File tree

114 files changed

+239
-78
lines changed

Some content is hidden

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

114 files changed

+239
-78
lines changed

Diff for: Cargo.lock

+11-6
Original file line numberDiff line numberDiff line change
@@ -2419,7 +2419,7 @@ dependencies = [
24192419
"rustc_version",
24202420
"serde",
24212421
"smallvec",
2422-
"ui_test 0.11.7",
2422+
"ui_test 0.21.2",
24232423
]
24242424

24252425
[[package]]
@@ -5621,18 +5621,23 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
56215621

56225622
[[package]]
56235623
name = "ui_test"
5624-
version = "0.11.7"
5624+
version = "0.20.0"
56255625
source = "registry+https://github.com/rust-lang/crates.io-index"
5626-
checksum = "c21899b59f53717dfad29e4f46e5b21a200a1b6888ab86532a07cfc8b48dd78c"
5626+
checksum = "bfd8fb9b15c8332cf51bfc2dc4830063b2446a9c9d732421b56f2478024a3971"
56275627
dependencies = [
5628+
"annotate-snippets",
5629+
"anyhow",
56285630
"bstr",
56295631
"cargo-platform",
56305632
"cargo_metadata",
56315633
"color-eyre",
56325634
"colored",
5635+
"comma",
56335636
"crossbeam-channel",
5634-
"diff",
5637+
"indicatif",
56355638
"lazy_static",
5639+
"levenshtein",
5640+
"prettydiff",
56365641
"regex",
56375642
"rustc_version",
56385643
"rustfix",
@@ -5643,9 +5648,9 @@ dependencies = [
56435648

56445649
[[package]]
56455650
name = "ui_test"
5646-
version = "0.20.0"
5651+
version = "0.21.2"
56475652
source = "registry+https://github.com/rust-lang/crates.io-index"
5648-
checksum = "bfd8fb9b15c8332cf51bfc2dc4830063b2446a9c9d732421b56f2478024a3971"
5653+
checksum = "aaf4bf7c184b8dfc7a4d3b90df789b1eb992ee42811cd115f32a7a1eb781058d"
56495654
dependencies = [
56505655
"annotate-snippets",
56515656
"anyhow",

Diff for: src/tools/miri/Cargo.lock

+114-6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ dependencies = [
2626
"memchr",
2727
]
2828

29+
[[package]]
30+
name = "annotate-snippets"
31+
version = "0.9.1"
32+
source = "registry+https://github.com/rust-lang/crates.io-index"
33+
checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36"
34+
dependencies = [
35+
"unicode-width",
36+
"yansi-term",
37+
]
38+
39+
[[package]]
40+
name = "ansi_term"
41+
version = "0.12.1"
42+
source = "registry+https://github.com/rust-lang/crates.io-index"
43+
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
44+
dependencies = [
45+
"winapi",
46+
]
47+
2948
[[package]]
3049
name = "anyhow"
3150
version = "1.0.71"
@@ -159,6 +178,25 @@ dependencies = [
159178
"windows-sys 0.48.0",
160179
]
161180

181+
[[package]]
182+
name = "comma"
183+
version = "1.0.0"
184+
source = "registry+https://github.com/rust-lang/crates.io-index"
185+
checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
186+
187+
[[package]]
188+
name = "console"
189+
version = "0.15.7"
190+
source = "registry+https://github.com/rust-lang/crates.io-index"
191+
checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8"
192+
dependencies = [
193+
"encode_unicode",
194+
"lazy_static",
195+
"libc",
196+
"unicode-width",
197+
"windows-sys 0.45.0",
198+
]
199+
162200
[[package]]
163201
name = "crossbeam-channel"
164202
version = "0.5.8"
@@ -189,10 +227,10 @@ dependencies = [
189227
]
190228

191229
[[package]]
192-
name = "diff"
193-
version = "0.1.13"
230+
name = "encode_unicode"
231+
version = "0.3.6"
194232
source = "registry+https://github.com/rust-lang/crates.io-index"
195-
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
233+
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
196234

197235
[[package]]
198236
name = "env_logger"
@@ -282,6 +320,19 @@ version = "0.3.3"
282320
source = "registry+https://github.com/rust-lang/crates.io-index"
283321
checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
284322

323+
[[package]]
324+
name = "indicatif"
325+
version = "0.17.7"
326+
source = "registry+https://github.com/rust-lang/crates.io-index"
327+
checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25"
328+
dependencies = [
329+
"console",
330+
"instant",
331+
"number_prefix",
332+
"portable-atomic",
333+
"unicode-width",
334+
]
335+
285336
[[package]]
286337
name = "instant"
287338
version = "0.1.12"
@@ -325,6 +376,12 @@ version = "1.4.0"
325376
source = "registry+https://github.com/rust-lang/crates.io-index"
326377
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
327378

379+
[[package]]
380+
name = "levenshtein"
381+
version = "1.0.5"
382+
source = "registry+https://github.com/rust-lang/crates.io-index"
383+
checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760"
384+
328385
[[package]]
329386
name = "libc"
330387
version = "0.2.148"
@@ -463,6 +520,12 @@ dependencies = [
463520
"static_assertions",
464521
]
465522

523+
[[package]]
524+
name = "number_prefix"
525+
version = "0.4.0"
526+
source = "registry+https://github.com/rust-lang/crates.io-index"
527+
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
528+
466529
[[package]]
467530
name = "object"
468531
version = "0.30.3"
@@ -484,6 +547,15 @@ version = "3.5.0"
484547
source = "registry+https://github.com/rust-lang/crates.io-index"
485548
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
486549

550+
[[package]]
551+
name = "pad"
552+
version = "0.1.6"
553+
source = "registry+https://github.com/rust-lang/crates.io-index"
554+
checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3"
555+
dependencies = [
556+
"unicode-width",
557+
]
558+
487559
[[package]]
488560
name = "parking_lot"
489561
version = "0.11.2"
@@ -524,12 +596,28 @@ version = "0.2.9"
524596
source = "registry+https://github.com/rust-lang/crates.io-index"
525597
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
526598

599+
[[package]]
600+
name = "portable-atomic"
601+
version = "1.4.3"
602+
source = "registry+https://github.com/rust-lang/crates.io-index"
603+
checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b"
604+
527605
[[package]]
528606
name = "ppv-lite86"
529607
version = "0.2.17"
530608
source = "registry+https://github.com/rust-lang/crates.io-index"
531609
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
532610

611+
[[package]]
612+
name = "prettydiff"
613+
version = "0.6.4"
614+
source = "registry+https://github.com/rust-lang/crates.io-index"
615+
checksum = "8ff1fec61082821f8236cf6c0c14e8172b62ce8a72a0eedc30d3b247bb68dc11"
616+
dependencies = [
617+
"ansi_term",
618+
"pad",
619+
]
620+
533621
[[package]]
534622
name = "proc-macro2"
535623
version = "1.0.66"
@@ -859,18 +947,23 @@ dependencies = [
859947

860948
[[package]]
861949
name = "ui_test"
862-
version = "0.11.7"
950+
version = "0.21.1"
863951
source = "registry+https://github.com/rust-lang/crates.io-index"
864-
checksum = "c21899b59f53717dfad29e4f46e5b21a200a1b6888ab86532a07cfc8b48dd78c"
952+
checksum = "accffe020b57a6dd50014d457b5842c5a2ca73cd84f07d86d0a19c460a6509ae"
865953
dependencies = [
954+
"annotate-snippets",
955+
"anyhow",
866956
"bstr",
867957
"cargo-platform",
868958
"cargo_metadata",
869959
"color-eyre",
870960
"colored",
961+
"comma",
871962
"crossbeam-channel",
872-
"diff",
963+
"indicatif",
873964
"lazy_static",
965+
"levenshtein",
966+
"prettydiff",
874967
"regex",
875968
"rustc_version",
876969
"rustfix",
@@ -885,6 +978,12 @@ version = "1.0.8"
885978
source = "registry+https://github.com/rust-lang/crates.io-index"
886979
checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
887980

981+
[[package]]
982+
name = "unicode-width"
983+
version = "0.1.11"
984+
source = "registry+https://github.com/rust-lang/crates.io-index"
985+
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
986+
888987
[[package]]
889988
name = "valuable"
890989
version = "0.1.0"
@@ -1059,3 +1158,12 @@ name = "windows_x86_64_msvc"
10591158
version = "0.48.0"
10601159
source = "registry+https://github.com/rust-lang/crates.io-index"
10611160
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
1161+
1162+
[[package]]
1163+
name = "yansi-term"
1164+
version = "0.1.2"
1165+
source = "registry+https://github.com/rust-lang/crates.io-index"
1166+
checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1"
1167+
dependencies = [
1168+
"winapi",
1169+
]

Diff for: src/tools/miri/Cargo.toml

+1-1
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"] }

Diff for: src/tools/miri/README.md

+2
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
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file is automatically @generated by Cargo.
2+
# It is not intended for manual editing.
3+
version = 3
4+
5+
[[package]]
6+
name = "invalidate"
7+
version = "0.1.0"
+8
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]
+4
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+
}

Diff for: src/tools/miri/cargo-miri/src/phases.rs

+2-2
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}");

Diff for: src/tools/miri/rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
42ca6e4e5760a548a6fa858482de6d237f6fb3b8
1+
2ba4eb2d49e774b5fbc2a06258ac7b0f60b92b7e

Diff for: src/tools/miri/src/borrow_tracker/stacked_borrows/diagnostics.rs

+7
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> {

Diff for: src/tools/miri/src/borrow_tracker/stacked_borrows/mod.rs

+1
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)