Skip to content

Commit

Permalink
Auto merge of rust-lang#99623 - RalfJung:rollup-0h066kc, r=RalfJung
Browse files Browse the repository at this point in the history
Rollup of 3 pull requests

Successful merges:

 - rust-lang#99588 (Update books)
 - rust-lang#99602 (cargotest: do not run quickcheck tests in xsv)
 - rust-lang#99607 (interpret: fix vtable check debug assertion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jul 23, 2022
2 parents 848090d + 25de227 commit 8aedb9c
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 8 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_const_eval/src/interpret/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book
Submodule book updated 38 files
+0 −3 first-edition/book.toml
+0 −56 first-edition/src/theme/first-edition.css
+0 −27 first-edition/src/theme/header.hbs
+0 −37 first-edition/src/theme/index.hbs
+0 −1 listings/ch12-an-io-project/listing-12-13/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-14/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-15/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-16/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-17/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-18/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-19/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-20/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-21/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-22/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-23/src/main.rs
+0 −1 listings/ch12-an-io-project/listing-12-24/src/main.rs
+0 −1 listings/ch12-an-io-project/no-listing-01-handling-errors-in-main/src/main.rs
+0 −1 listings/ch12-an-io-project/no-listing-02-using-search-in-run/src/main.rs
+0 −1 listings/ch12-an-io-project/output-only-02-missing-lifetimes/src/main.rs
+0 −1 listings/ch12-an-io-project/output-only-03-multiple-matches/src/main.rs
+0 −1 listings/ch12-an-io-project/output-only-04-no-matches/src/main.rs
+0 −1 listings/ch13-functional-features/listing-12-23-reproduced/src/main.rs
+0 −1 listings/ch13-functional-features/listing-12-24-reproduced/src/main.rs
+0 −1 listings/ch13-functional-features/listing-13-18/src/main.rs
+0 −1 listings/ch13-functional-features/listing-13-19/src/main.rs
+0 −1 listings/ch13-functional-features/listing-13-20/src/main.rs
+0 −1 listings/ch13-functional-features/listing-13-22/src/main.rs
+13 −123 nostarch/chapter12.md
+58 −154 nostarch/chapter13.md
+6 −56 nostarch/chapter15.md
+0 −37 second-edition/src/theme/index.hbs
+5 −5 src/ch12-03-improving-error-handling-and-modularity.md
+2 −2 src/ch13-01-closures.md
+6 −5 src/ch13-02-iterators.md
+1 −1 src/ch15-00-smart-pointers.md
+7 −6 src/ch15-03-drop.md
+1 −1 src/ch15-06-reference-cycles.md
+1 −1 src/ch16-02-message-passing.md
2 changes: 1 addition & 1 deletion src/doc/nomicon
Submodule nomicon updated 1 files
+1 −1 src/vec/vec-alloc.md
2 changes: 1 addition & 1 deletion src/doc/rust-by-example
29 changes: 28 additions & 1 deletion src/tools/cargotest/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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] = &[
Expand All @@ -22,6 +24,7 @@ const TEST_REPOS: &[Test] = &[
packages: &[],
features: None,
manifest_path: None,
filters: &[],
},
Test {
name: "ripgrep",
Expand All @@ -31,6 +34,7 @@ const TEST_REPOS: &[Test] = &[
packages: &[],
features: None,
manifest_path: None,
filters: &[],
},
Test {
name: "tokei",
Expand All @@ -40,6 +44,7 @@ const TEST_REPOS: &[Test] = &[
packages: &[],
features: None,
manifest_path: None,
filters: &[],
},
Test {
name: "xsv",
Expand All @@ -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",
Expand All @@ -60,6 +80,7 @@ const TEST_REPOS: &[Test] = &[
packages: &["selectors"],
features: None,
manifest_path: None,
filters: &[],
},
Test {
name: "diesel",
Expand All @@ -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: &[],
},
];

Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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");
Expand All @@ -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")
Expand Down

0 comments on commit 8aedb9c

Please sign in to comment.