From d2cd32c7da11a735c0b60b8ab29277c6abad9340 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 21 Jul 2022 20:41:44 -0700 Subject: [PATCH 1/3] Update books --- src/doc/book | 2 +- src/doc/nomicon | 2 +- src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- src/doc/rustc-dev-guide | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/book b/src/doc/book index cf2653a5ca553..36383b4da21db 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit cf2653a5ca553cbbb4a17f1a7db1947820f6a775 +Subproject commit 36383b4da21dbd0a0781473bc8ad7ef0ed1b6751 diff --git a/src/doc/nomicon b/src/doc/nomicon index 70db9e4189f64..8d1e4dccf7111 160000 --- a/src/doc/nomicon +++ b/src/doc/nomicon @@ -1 +1 @@ -Subproject commit 70db9e4189f64d1d8e2451b1046111fb356b6dc2 +Subproject commit 8d1e4dccf71114ff56f328f671f2026d8e6b62a2 diff --git a/src/doc/reference b/src/doc/reference index 9fce337a55ee4..a92be0fef439b 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 9fce337a55ee4a4629205f6094656195cecad231 +Subproject commit a92be0fef439b3d8e0468d82cb24812d303520a0 diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 83724ca387a2a..3155db49b0d57 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 83724ca387a2a1cd3e8d848f62820020760e358b +Subproject commit 3155db49b0d57cd82c65456ac210b69ecec5ccb1 diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide index eb83839e903a0..d5201cddace97 160000 --- a/src/doc/rustc-dev-guide +++ b/src/doc/rustc-dev-guide @@ -1 +1 @@ -Subproject commit eb83839e903a0a8f1406f7e941886273f189b26b +Subproject commit d5201cddace979b299ec1bf9fd8997338151aa9d From 19e29e9a5750c744926a491238e6c80e8a929988 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 22 Jul 2022 10:37:03 -0400 Subject: [PATCH 2/3] interpret: fix vtable check debug assertion --- compiler/rustc_const_eval/src/interpret/terminator.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index e7e60b5fa2362..6fef7b3b3cf7c 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -589,13 +589,12 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { ty::ExistentialTraitRef::erase_self_ty(tcx, virtual_trait_ref); let concrete_trait_ref = existential_trait_ref.with_self_ty(tcx, dyn_ty); - let concrete_method = Instance::resolve( + let concrete_method = Instance::resolve_for_vtable( tcx, self.param_env, def_id, instance.substs.rebase_onto(tcx, trait_def_id, concrete_trait_ref.substs), ) - .unwrap() .unwrap(); assert_eq!(fn_inst, concrete_method); } From 77be253c9bd255becf8b86c48e08919e8f825bdc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 22 Jul 2022 09:23:21 -0400 Subject: [PATCH 3/3] cargotest: do not run quickcheck tests in xsv --- src/tools/cargotest/main.rs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/tools/cargotest/main.rs b/src/tools/cargotest/main.rs index 908cfc15c0d10..95fe98a683ffd 100644 --- a/src/tools/cargotest/main.rs +++ b/src/tools/cargotest/main.rs @@ -11,6 +11,8 @@ struct Test { packages: &'static [&'static str], features: Option<&'static [&'static str]>, manifest_path: Option<&'static str>, + /// `filters` are passed to libtest (i.e., after a `--` in the `cargo test` invocation). + filters: &'static [&'static str], } const TEST_REPOS: &[Test] = &[ @@ -22,6 +24,7 @@ const TEST_REPOS: &[Test] = &[ packages: &[], features: None, manifest_path: None, + filters: &[], }, Test { name: "ripgrep", @@ -31,6 +34,7 @@ const TEST_REPOS: &[Test] = &[ packages: &[], features: None, manifest_path: None, + filters: &[], }, Test { name: "tokei", @@ -40,6 +44,7 @@ const TEST_REPOS: &[Test] = &[ packages: &[], features: None, manifest_path: None, + filters: &[], }, Test { name: "xsv", @@ -49,6 +54,21 @@ const TEST_REPOS: &[Test] = &[ packages: &[], features: None, manifest_path: None, + // Many tests here use quickcheck and some of them can fail randomly, so only run deterministic tests. + filters: &[ + "test_flatten::", + "test_fmt::", + "test_headers::", + "test_index::", + "test_join::", + "test_partition::", + "test_search::", + "test_select::", + "test_slice::", + "test_split::", + "test_stats::", + "test_table::", + ], }, Test { name: "servo", @@ -60,6 +80,7 @@ const TEST_REPOS: &[Test] = &[ packages: &["selectors"], features: None, manifest_path: None, + filters: &[], }, Test { name: "diesel", @@ -75,6 +96,7 @@ const TEST_REPOS: &[Test] = &[ // not any other crate present in the diesel workspace // (This is required to set the feature flags above) manifest_path: Some("diesel/Cargo.toml"), + filters: &[], }, ]; @@ -97,7 +119,8 @@ fn test_repo(cargo: &Path, out_dir: &Path, test: &Test) { if let Some(lockfile) = test.lock { fs::write(&dir.join("Cargo.lock"), lockfile).unwrap(); } - if !run_cargo_test(cargo, &dir, test.packages, test.features, test.manifest_path) { + if !run_cargo_test(cargo, &dir, test.packages, test.features, test.manifest_path, test.filters) + { panic!("tests failed for {}", test.repo); } } @@ -155,6 +178,7 @@ fn run_cargo_test( packages: &[&str], features: Option<&[&str]>, manifest_path: Option<&str>, + filters: &[&str], ) -> bool { let mut command = Command::new(cargo_path); command.arg("test"); @@ -174,6 +198,9 @@ fn run_cargo_test( command.arg("-p").arg(name); } + command.arg("--"); + command.args(filters); + let status = command // Disable rust-lang/cargo's cross-compile tests .env("CFG_DISABLE_CROSS_TESTS", "1")