Skip to content

Commit 8aedb9c

Browse files
committed
Auto merge of #99623 - RalfJung:rollup-0h066kc, r=RalfJung
Rollup of 3 pull requests Successful merges: - #99588 (Update books) - #99602 (cargotest: do not run quickcheck tests in xsv) - #99607 (interpret: fix vtable check debug assertion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 848090d + 25de227 commit 8aedb9c

File tree

7 files changed

+34
-8
lines changed

7 files changed

+34
-8
lines changed

compiler/rustc_const_eval/src/interpret/terminator.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
589589
ty::ExistentialTraitRef::erase_self_ty(tcx, virtual_trait_ref);
590590
let concrete_trait_ref = existential_trait_ref.with_self_ty(tcx, dyn_ty);
591591

592-
let concrete_method = Instance::resolve(
592+
let concrete_method = Instance::resolve_for_vtable(
593593
tcx,
594594
self.param_env,
595595
def_id,
596596
instance.substs.rebase_onto(tcx, trait_def_id, concrete_trait_ref.substs),
597597
)
598-
.unwrap()
599598
.unwrap();
600599
assert_eq!(fn_inst, concrete_method);
601600
}

src/doc/book

Submodule book updated 38 files

src/doc/nomicon

src/tools/cargotest/main.rs

+28-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ struct Test {
1111
packages: &'static [&'static str],
1212
features: Option<&'static [&'static str]>,
1313
manifest_path: Option<&'static str>,
14+
/// `filters` are passed to libtest (i.e., after a `--` in the `cargo test` invocation).
15+
filters: &'static [&'static str],
1416
}
1517

1618
const TEST_REPOS: &[Test] = &[
@@ -22,6 +24,7 @@ const TEST_REPOS: &[Test] = &[
2224
packages: &[],
2325
features: None,
2426
manifest_path: None,
27+
filters: &[],
2528
},
2629
Test {
2730
name: "ripgrep",
@@ -31,6 +34,7 @@ const TEST_REPOS: &[Test] = &[
3134
packages: &[],
3235
features: None,
3336
manifest_path: None,
37+
filters: &[],
3438
},
3539
Test {
3640
name: "tokei",
@@ -40,6 +44,7 @@ const TEST_REPOS: &[Test] = &[
4044
packages: &[],
4145
features: None,
4246
manifest_path: None,
47+
filters: &[],
4348
},
4449
Test {
4550
name: "xsv",
@@ -49,6 +54,21 @@ const TEST_REPOS: &[Test] = &[
4954
packages: &[],
5055
features: None,
5156
manifest_path: None,
57+
// Many tests here use quickcheck and some of them can fail randomly, so only run deterministic tests.
58+
filters: &[
59+
"test_flatten::",
60+
"test_fmt::",
61+
"test_headers::",
62+
"test_index::",
63+
"test_join::",
64+
"test_partition::",
65+
"test_search::",
66+
"test_select::",
67+
"test_slice::",
68+
"test_split::",
69+
"test_stats::",
70+
"test_table::",
71+
],
5272
},
5373
Test {
5474
name: "servo",
@@ -60,6 +80,7 @@ const TEST_REPOS: &[Test] = &[
6080
packages: &["selectors"],
6181
features: None,
6282
manifest_path: None,
83+
filters: &[],
6384
},
6485
Test {
6586
name: "diesel",
@@ -75,6 +96,7 @@ const TEST_REPOS: &[Test] = &[
7596
// not any other crate present in the diesel workspace
7697
// (This is required to set the feature flags above)
7798
manifest_path: Some("diesel/Cargo.toml"),
99+
filters: &[],
78100
},
79101
];
80102

@@ -97,7 +119,8 @@ fn test_repo(cargo: &Path, out_dir: &Path, test: &Test) {
97119
if let Some(lockfile) = test.lock {
98120
fs::write(&dir.join("Cargo.lock"), lockfile).unwrap();
99121
}
100-
if !run_cargo_test(cargo, &dir, test.packages, test.features, test.manifest_path) {
122+
if !run_cargo_test(cargo, &dir, test.packages, test.features, test.manifest_path, test.filters)
123+
{
101124
panic!("tests failed for {}", test.repo);
102125
}
103126
}
@@ -155,6 +178,7 @@ fn run_cargo_test(
155178
packages: &[&str],
156179
features: Option<&[&str]>,
157180
manifest_path: Option<&str>,
181+
filters: &[&str],
158182
) -> bool {
159183
let mut command = Command::new(cargo_path);
160184
command.arg("test");
@@ -174,6 +198,9 @@ fn run_cargo_test(
174198
command.arg("-p").arg(name);
175199
}
176200

201+
command.arg("--");
202+
command.args(filters);
203+
177204
let status = command
178205
// Disable rust-lang/cargo's cross-compile tests
179206
.env("CFG_DISABLE_CROSS_TESTS", "1")

0 commit comments

Comments
 (0)