diff --git a/.gitignore b/.gitignore index b53b06b03cac6..a0b491f42789a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# This file should only ignore things that are generated during a build, +# generated by common IDEs, and optional files controlled by the user +# that affect the build (such as config.toml). +# FIXME: This needs cleanup. *~ .#* .DS_Store @@ -14,20 +18,16 @@ __pycache__/ .valgrindrc .vscode .favorites.json -/*-*-*-*/ -/*-*-*/ /Makefile -/build +/build/ /config.toml /dist/ /dl/ -/doc +/doc/ /inst/ /llvm/ /mingw-build/ -/nd/ /obj/ -/rt/ /rustllvm/ /src/libcore/unicode/DerivedCoreProperties.txt /src/libcore/unicode/DerivedNormalizationProps.txt @@ -37,11 +37,7 @@ __pycache__/ /src/libcore/unicode/SpecialCasing.txt /src/libcore/unicode/UnicodeData.txt /src/libcore/unicode/downloaded -/stage[0-9]+/ -/target -target/ -/test/ -/tmp/ +/target/ tags tags.* TAGS @@ -50,17 +46,6 @@ TAGS.* \#*\# config.mk config.stamp -keywords.md -lexer.ml Session.vim -src/etc/dl -tmp.*.rs -version.md -version.ml -version.texi .cargo -!src/vendor/** -/src/target/ - no_llvm_build - diff --git a/config.toml.example b/config.toml.example index 6816eaeaa9486..cb9f388a8e47b 100644 --- a/config.toml.example +++ b/config.toml.example @@ -368,10 +368,6 @@ # When creating source tarballs whether or not to create a source tarball. #dist-src = false -# Whether to also run the Miri tests suite when running tests. -# As a side-effect also generates MIR for all libraries. -#test-miri = false - # After building or testing extended tools (e.g. clippy and rustfmt), append the # result (broken, compiling, testing) into this JSON file. #save-toolstates = "/path/to/toolstates.json" diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index f1b36f5858037..0000000000000 --- a/src/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -*.a -*.aux -*.bc -*.boot -*.bz2 -*.cmi -*.cmo -*.cmx -*.cp -*.cps -*.d -*.dSYM -*.def -*.diff -*.dll -*.dylib -*.elc -*.epub -*.exe -*.fn -*.html -*.kdev4 -*.ky -*.ll -*.llvm -*.log -*.o -*.orig -*.out -*.patch -*.pdb -*.pdf -*.pg -*.pot -*.pyc -*.rej -*.rlib -*.rustc -*.so -*.swo -*.swp -*.tmp -*.toc -*.tp -*.vr -*.x86 diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 23f81c2c87692..54b689fb062a5 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -143,8 +143,11 @@ fn main() { if let Some(target) = target { // The stage0 compiler has a special sysroot distinct from what we - // actually downloaded, so we just always pass the `--sysroot` option. - cmd.arg("--sysroot").arg(&sysroot); + // actually downloaded, so we just always pass the `--sysroot` option, + // unless one is already set. + if !args.iter().any(|arg| arg == "--sysroot") { + cmd.arg("--sysroot").arg(&sysroot); + } cmd.arg("-Zexternal-macro-backtrace"); @@ -285,20 +288,6 @@ fn main() { } } - // When running miri tests, we need to generate MIR for all libraries - if env::var("TEST_MIRI").ok().map_or(false, |val| val == "true") { - // The flags here should be kept in sync with `add_miri_default_args` - // in miri's `src/lib.rs`. - cmd.arg("-Zalways-encode-mir"); - cmd.arg("--cfg=miri"); - // These options are preferred by miri, to be able to perform better validation, - // but the bootstrap compiler might not understand them. - if stage != "0" { - cmd.arg("-Zmir-emit-retag"); - cmd.arg("-Zmir-opt-level=0"); - } - } - if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { cmd.arg("--remap-path-prefix").arg(&map); } diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 5a75497173eb3..e54c9360baece 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -543,15 +543,6 @@ impl<'a> Builder<'a> { parent: Cell::new(None), }; - if kind == Kind::Dist { - assert!( - !builder.config.test_miri, - "Do not distribute with miri enabled.\n\ - The distributed libraries would include all MIR (increasing binary size). - The distributed MIR would include validation statements." - ); - } - builder } @@ -981,7 +972,6 @@ impl<'a> Builder<'a> { PathBuf::from("/path/to/nowhere/rustdoc/not/required") }, ) - .env("TEST_MIRI", self.config.test_miri.to_string()) .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir()); if let Some(host_linker) = self.linker(compiler.host) { diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 5a5f4ac725204..a5bfafdfdb4dc 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -128,7 +128,6 @@ pub struct Config { pub low_priority: bool, pub channel: String, pub verbose_tests: bool, - pub test_miri: bool, pub save_toolstates: Option, pub print_step_timings: bool, pub missing_tools: bool, @@ -315,7 +314,6 @@ struct Rust { debug: Option, dist_src: Option, verbose_tests: Option, - test_miri: Option, incremental: Option, save_toolstates: Option, codegen_backends: Option>, @@ -375,7 +373,6 @@ impl Config { config.codegen_tests = true; config.ignore_git = false; config.rust_dist_src = true; - config.test_miri = false; config.rust_codegen_backends = vec![INTERNER.intern_str("llvm")]; config.rust_codegen_backends_dir = "codegen-backends".to_owned(); config.deny_warnings = true; @@ -557,7 +554,6 @@ impl Config { set(&mut config.channel, rust.channel.clone()); set(&mut config.rust_dist_src, rust.dist_src); set(&mut config.verbose_tests, rust.verbose_tests); - set(&mut config.test_miri, rust.test_miri); // in the case "false" is set explicitly, do not overwrite the command line args if let Some(true) = rust.incremental { config.incremental = true; diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 298330869b684..346f0cb2039c0 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -36,7 +36,6 @@ def v(*args): o("compiler-docs", "build.compiler-docs", "build compiler documentation") o("optimize-tests", "rust.optimize-tests", "build tests with optimizations") o("parallel-compiler", "rust.parallel-compiler", "build a multi-threaded rustc") -o("test-miri", "rust.test-miri", "run miri's test suite") o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests") o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds") o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds") diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index c8ea3157dc92b..b72aa78f3de19 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -540,9 +540,7 @@ impl Build { Mode::Rustc => "-rustc", Mode::Codegen => "-codegen", Mode::ToolBootstrap => "-bootstrap-tools", - Mode::ToolStd => "-tools", - Mode::ToolTest => "-tools", - Mode::ToolRustc => "-tools", + Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools", }; self.out.join(&*compiler.host) .join(format!("stage{}{}", compiler.stage, suffix)) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index e5b0a46ba6fb6..c2c134bfd1d7d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -363,11 +363,9 @@ pub struct Miri { impl Step for Miri { type Output = (); const ONLY_HOSTS: bool = true; - const DEFAULT: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - let test_miri = run.builder.config.test_miri; - run.path("src/tools/miri").default_condition(test_miri) + run.path("src/tools/miri") } fn make_run(run: RunConfig<'_>) { @@ -389,26 +387,92 @@ impl Step for Miri { extra_features: Vec::new(), }); if let Some(miri) = miri { - let mut cargo = tool::prepare_tool_cargo(builder, - compiler, - Mode::ToolRustc, - host, - "test", - "src/tools/miri", - SourceType::Submodule, - &[]); + // # Run `cargo miri setup`. + // As a side-effect, this will install xargo. + let mut cargo = tool::prepare_tool_cargo( + builder, + compiler, + Mode::ToolRustc, + host, + "run", + "src/tools/miri", + SourceType::Submodule, + &[], + ); + cargo + .arg("--bin") + .arg("cargo-miri") + .arg("--") + .arg("miri") + .arg("setup"); + + // Tell `cargo miri` not to worry about the sysroot mismatch (we built with + // stage1 but run with stage2). + cargo.env("MIRI_SKIP_SYSROOT_CHECK", "1"); + // Tell `cargo miri setup` where to find the sources. + cargo.env("XARGO_RUST_SRC", builder.src.join("src")); + // Debug things. + cargo.env("RUST_BACKTRACE", "1"); + // Configure `cargo install` path, and let cargo-miri know that that's where + // xargo ends up. + cargo.env("CARGO_INSTALL_ROOT", &builder.out); // cargo adds a `bin/` + cargo.env("XARGO", builder.out.join("bin").join("xargo")); + + if !try_run(builder, &mut cargo) { + return; + } + + // # Determine where Miri put its sysroot. + // To this end, we run `cargo miri setup --env` and capture the output. + // (We do this separately from the above so that when the setup actually + // happens we get some output.) + // We re-use the `cargo` from above. + cargo.arg("--env"); + + // FIXME: Is there a way in which we can re-use the usual `run` helpers? + let miri_sysroot = if builder.config.dry_run { + String::new() + } else { + builder.verbose(&format!("running: {:?}", cargo)); + let out = cargo.output() + .expect("We already ran `cargo miri setup` before and that worked"); + assert!(out.status.success(), "`cargo miri setup` returned with non-0 exit code"); + // Output is "MIRI_SYSROOT=\n". + let stdout = String::from_utf8(out.stdout) + .expect("`cargo miri setup` stdout is not valid UTF-8"); + let stdout = stdout.trim(); + builder.verbose(&format!("`cargo miri setup --env` returned: {:?}", stdout)); + let sysroot = stdout.splitn(2, '=') + .nth(1).expect("`cargo miri setup` stdout did not contain '='"); + sysroot.to_owned() + }; + + // # Run `cargo test`. + let mut cargo = tool::prepare_tool_cargo( + builder, + compiler, + Mode::ToolRustc, + host, + "test", + "src/tools/miri", + SourceType::Submodule, + &[], + ); // miri tests need to know about the stage sysroot - cargo.env("MIRI_SYSROOT", builder.sysroot(compiler)); + cargo.env("MIRI_SYSROOT", miri_sysroot); cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler)); cargo.env("MIRI_PATH", miri); builder.add_rustc_lib_path(compiler, &mut cargo); - if try_run(builder, &mut cargo) { - builder.save_toolstate("miri", ToolState::TestPass); + if !try_run(builder, &mut cargo) { + return; } + + // # Done! + builder.save_toolstate("miri", ToolState::TestPass); } else { eprintln!("failed to test miri: could not build"); } diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml index 6ed1585c5168b..687856cca6b62 100644 --- a/src/ci/azure-pipelines/auto.yml +++ b/src/ci/azure-pipelines/auto.yml @@ -254,7 +254,7 @@ jobs: x86_64-msvc-tools: MSYS_BITS: 64 SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json # 32/64-bit MinGW builds. # diff --git a/src/ci/docker/x86_64-gnu-tools/Dockerfile b/src/ci/docker/x86_64-gnu-tools/Dockerfile index bab9145cbcb9c..f11ae7a34cb91 100644 --- a/src/ci/docker/x86_64-gnu-tools/Dockerfile +++ b/src/ci/docker/x86_64-gnu-tools/Dockerfile @@ -23,6 +23,5 @@ COPY x86_64-gnu-tools/repo.sh /tmp/ ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ - --enable-test-miri \ --save-toolstates=/tmp/toolstates.json ENV SCRIPT /tmp/checktools.sh ../x.py /tmp/toolstates.json linux diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index 88a56174629f9..271ddcc4662cf 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -188,7 +188,8 @@ //! you do not accidentally use `self`/`this` in a way that is in conflict with pinning. //! //! Moreover, if your type is `#[repr(packed)]`, the compiler will automatically -//! move fields around to be able to drop them. As a consequence, you cannot use +//! move fields around to be able to drop them. It might even do +//! that for fields that happen to be sufficiently aligned. As a consequence, you cannot use //! pinning with a `#[repr(packed)]` type. //! //! # Projections and Structural Pinning diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 2c56f5fb4523a..e7feccf506957 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -4084,7 +4084,7 @@ impl<'a> Resolver<'a> { )), ) } else if !ident.is_reserved() { - (format!("maybe a missing `extern crate {};`?", ident), None) + (format!("maybe a missing crate `{}`?", ident), None) } else { // the parser will already have complained about the keyword being used return PathResult::NonModule(PartialRes::new(Res::Err)); diff --git a/src/libsyntax/source_map.rs b/src/libsyntax/source_map.rs index f83c1dbf7eed0..4e29c77c89e42 100644 --- a/src/libsyntax/source_map.rs +++ b/src/libsyntax/source_map.rs @@ -125,12 +125,12 @@ impl StableSourceFileId { #[derive(Default)] pub(super) struct SourceMapFiles { - pub(super) source_files: Vec>, + source_files: Vec>, stable_id_to_source_file: FxHashMap> } pub struct SourceMap { - pub(super) files: Lock, + files: Lock, file_loader: Box, // This is used to apply the file path remapping as specified via // --remap-path-prefix to all SourceFiles allocated within this SourceMap. diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.rs b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs new file mode 100644 index 0000000000000..6a766ede0ed87 --- /dev/null +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs @@ -0,0 +1,67 @@ +// Test that `async { .. }` blocks: +// 1. do not allow `break` expressions. +// 2. get targeted by `return` and not the parent function. +// 3. get targeted by `?` and not the parent function. +// +// edition:2018 +// ignore-tidy-linelength + +#![feature(async_await)] + +fn main() {} + +use core::future::Future; + +fn return_targets_async_block_not_fn() -> u8 { + //~^ ERROR mismatched types + let block = async { + return 0u8; + }; + let _: &dyn Future = █ + //~^ ERROR type mismatch resolving `::Output == ()` +} + +async fn return_targets_async_block_not_async_fn() -> u8 { + //~^ ERROR type mismatch resolving + let block = async { + return 0u8; + }; + let _: &dyn Future = █ + //~^ ERROR type mismatch resolving `::Output == ()` +} + +fn no_break_in_async_block() { + async { + break 0u8; //~ ERROR `break` inside of a closure + // FIXME: This diagnostic is pretty bad. + }; +} + +fn no_break_in_async_block_even_with_outer_loop() { + loop { + async { + break 0u8; //~ ERROR `break` inside of a closure + }; + } +} + +struct MyErr; +fn err() -> Result { Err(MyErr) } + +fn rethrow_targets_async_block_not_fn() -> Result { + //~^ ERROR mismatched types + let block = async { + err()?; + Ok(()) + }; + let _: &dyn Future> = █ +} + +fn rethrow_targets_async_block_not_async_fn() -> Result { + //~^ ERROR mismatched types + let block = async { + err()?; + Ok(()) + }; + let _: &dyn Future> = █ +} diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr new file mode 100644 index 0000000000000..96927ac9632d6 --- /dev/null +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -0,0 +1,79 @@ +error[E0267]: `break` inside of a closure + --> $DIR/async-block-control-flow-static-semantics.rs:35:9 + | +LL | break 0u8; + | ^^^^^^^^^ cannot break inside of a closure + +error[E0267]: `break` inside of a closure + --> $DIR/async-block-control-flow-static-semantics.rs:43:13 + | +LL | break 0u8; + | ^^^^^^^^^ cannot break inside of a closure + +error[E0308]: mismatched types + --> $DIR/async-block-control-flow-static-semantics.rs:15:43 + | +LL | fn return_targets_async_block_not_fn() -> u8 { + | --------------------------------- ^^ expected u8, found () + | | + | this function's body doesn't return + | + = note: expected type `u8` + found type `()` + +error[E0271]: type mismatch resolving `::Output == ()` + --> $DIR/async-block-control-flow-static-semantics.rs:20:39 + | +LL | let _: &dyn Future = █ + | ^^^^^^ expected u8, found () + | + = note: expected type `u8` + found type `()` + = note: required for the cast to the object type `dyn std::future::Future` + +error[E0271]: type mismatch resolving `::Output == ()` + --> $DIR/async-block-control-flow-static-semantics.rs:29:39 + | +LL | let _: &dyn Future = █ + | ^^^^^^ expected u8, found () + | + = note: expected type `u8` + found type `()` + = note: required for the cast to the object type `dyn std::future::Future` + +error[E0271]: type mismatch resolving `::Output == u8` + --> $DIR/async-block-control-flow-static-semantics.rs:24:55 + | +LL | async fn return_targets_async_block_not_async_fn() -> u8 { + | ^^ expected (), found u8 + | + = note: expected type `()` + found type `u8` + = note: the return type of a function must have a statically known size + +error[E0308]: mismatched types + --> $DIR/async-block-control-flow-static-semantics.rs:51:44 + | +LL | fn rethrow_targets_async_block_not_fn() -> Result { + | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () + | | + | this function's body doesn't return + | + = note: expected type `std::result::Result` + found type `()` + +error[E0308]: mismatched types + --> $DIR/async-block-control-flow-static-semantics.rs:60:50 + | +LL | fn rethrow_targets_async_block_not_async_fn() -> Result { + | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () + | | + | this function's body doesn't return + | + = note: expected type `std::result::Result` + found type `()` + +error: aborting due to 8 previous errors + +Some errors have detailed explanations: E0267, E0271, E0308. +For more information about an error, try `rustc --explain E0267`. diff --git a/src/test/ui/error-codes/E0432.stderr b/src/test/ui/error-codes/E0432.stderr index 137a1af6f95b0..afb031c225234 100644 --- a/src/test/ui/error-codes/E0432.stderr +++ b/src/test/ui/error-codes/E0432.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `something` --> $DIR/E0432.rs:1:5 | LL | use something::Foo; - | ^^^^^^^^^ maybe a missing `extern crate something;`? + | ^^^^^^^^^ maybe a missing crate `something`? error: aborting due to previous error diff --git a/src/test/ui/extern-prelude-fail.stderr b/src/test/ui/extern-prelude-fail.stderr index 9cd56ea7f5b66..a59f4c952bb08 100644 --- a/src/test/ui/extern-prelude-fail.stderr +++ b/src/test/ui/extern-prelude-fail.stderr @@ -2,13 +2,13 @@ error[E0432]: unresolved import `extern_prelude` --> $DIR/extern-prelude-fail.rs:7:9 | LL | use extern_prelude::S; - | ^^^^^^^^^^^^^^ maybe a missing `extern crate extern_prelude;`? + | ^^^^^^^^^^^^^^ maybe a missing crate `extern_prelude`? -error[E0433]: failed to resolve: maybe a missing `extern crate extern_prelude;`? +error[E0433]: failed to resolve: maybe a missing crate `extern_prelude`? --> $DIR/extern-prelude-fail.rs:8:15 | LL | let s = ::extern_prelude::S; - | ^^^^^^^^^^^^^^ maybe a missing `extern crate extern_prelude;`? + | ^^^^^^^^^^^^^^ maybe a missing crate `extern_prelude`? error: aborting due to 2 previous errors diff --git a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr index 59b28704ddb73..2f4c220ee9505 100644 --- a/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr +++ b/src/test/ui/feature-gates/feature-gate-extern_absolute_paths.stderr @@ -2,13 +2,13 @@ error[E0432]: unresolved import `core` --> $DIR/feature-gate-extern_absolute_paths.rs:1:5 | LL | use core::default; - | ^^^^ maybe a missing `extern crate core;`? + | ^^^^ maybe a missing crate `core`? -error[E0433]: failed to resolve: maybe a missing `extern crate core;`? +error[E0433]: failed to resolve: maybe a missing crate `core`? --> $DIR/feature-gate-extern_absolute_paths.rs:4:19 | LL | let _: u8 = ::core::default::Default(); - | ^^^^ maybe a missing `extern crate core;`? + | ^^^^ maybe a missing crate `core`? error: aborting due to 2 previous errors diff --git a/src/test/ui/import3.stderr b/src/test/ui/import3.stderr index 73b9b27b57cb1..7bb413be59ff3 100644 --- a/src/test/ui/import3.stderr +++ b/src/test/ui/import3.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `main` --> $DIR/import3.rs:2:5 | LL | use main::bar; - | ^^^^ maybe a missing `extern crate main;`? + | ^^^^ maybe a missing crate `main`? error: aborting due to previous error diff --git a/src/test/ui/imports/issue-53269.stderr b/src/test/ui/imports/issue-53269.stderr index 613c59867c989..bbec2aae82592 100644 --- a/src/test/ui/imports/issue-53269.stderr +++ b/src/test/ui/imports/issue-53269.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `nonexistent_module` --> $DIR/issue-53269.rs:6:9 | LL | use nonexistent_module::mac; - | ^^^^^^^^^^^^^^^^^^ maybe a missing `extern crate nonexistent_module;`? + | ^^^^^^^^^^^^^^^^^^ maybe a missing crate `nonexistent_module`? error[E0659]: `mac` is ambiguous (`macro_rules` vs non-`macro_rules` from other module) --> $DIR/issue-53269.rs:8:5 diff --git a/src/test/ui/imports/issue-55457.stderr b/src/test/ui/imports/issue-55457.stderr index 86a76c1d89c70..aa103ba01e34e 100644 --- a/src/test/ui/imports/issue-55457.stderr +++ b/src/test/ui/imports/issue-55457.stderr @@ -11,7 +11,7 @@ error[E0432]: unresolved import `non_existent` --> $DIR/issue-55457.rs:2:5 | LL | use non_existent::non_existent; - | ^^^^^^^^^^^^ maybe a missing `extern crate non_existent;`? + | ^^^^^^^^^^^^ maybe a missing crate `non_existent`? error: cannot determine resolution for the derive macro `NonExistent` --> $DIR/issue-55457.rs:5:10 diff --git a/src/test/ui/imports/unresolved-imports-used.stderr b/src/test/ui/imports/unresolved-imports-used.stderr index f20db881c8628..e8c827a6179bb 100644 --- a/src/test/ui/imports/unresolved-imports-used.stderr +++ b/src/test/ui/imports/unresolved-imports-used.stderr @@ -8,7 +8,7 @@ error[E0432]: unresolved import `foo` --> $DIR/unresolved-imports-used.rs:10:5 | LL | use foo::bar; - | ^^^ maybe a missing `extern crate foo;`? + | ^^^ maybe a missing crate `foo`? error[E0603]: function `quz` is private --> $DIR/unresolved-imports-used.rs:8:10 diff --git a/src/test/ui/issues/issue-1697.rs b/src/test/ui/issues/issue-1697.rs index 30b2558dce9dd..5cd76d21f91cf 100644 --- a/src/test/ui/issues/issue-1697.rs +++ b/src/test/ui/issues/issue-1697.rs @@ -1,6 +1,6 @@ // Testing that we don't fail abnormally after hitting the errors use unresolved::*; //~ ERROR unresolved import `unresolved` [E0432] - //~^ maybe a missing `extern crate unresolved;`? + //~^ maybe a missing crate `unresolved`? fn main() {} diff --git a/src/test/ui/issues/issue-1697.stderr b/src/test/ui/issues/issue-1697.stderr index 6ae5bd1fc2649..a76fd30991493 100644 --- a/src/test/ui/issues/issue-1697.stderr +++ b/src/test/ui/issues/issue-1697.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `unresolved` --> $DIR/issue-1697.rs:3:5 | LL | use unresolved::*; - | ^^^^^^^^^^ maybe a missing `extern crate unresolved;`? + | ^^^^^^^^^^ maybe a missing crate `unresolved`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-33464.stderr b/src/test/ui/issues/issue-33464.stderr index bbf8d21cf65a4..d3bf404c99a97 100644 --- a/src/test/ui/issues/issue-33464.stderr +++ b/src/test/ui/issues/issue-33464.stderr @@ -2,19 +2,19 @@ error[E0432]: unresolved import `abc` --> $DIR/issue-33464.rs:3:5 | LL | use abc::one_el; - | ^^^ maybe a missing `extern crate abc;`? + | ^^^ maybe a missing crate `abc`? error[E0432]: unresolved import `abc` --> $DIR/issue-33464.rs:5:5 | LL | use abc::{a, bbb, cccccc}; - | ^^^ maybe a missing `extern crate abc;`? + | ^^^ maybe a missing crate `abc`? error[E0432]: unresolved import `a_very_long_name` --> $DIR/issue-33464.rs:7:5 | LL | use a_very_long_name::{el, el2}; - | ^^^^^^^^^^^^^^^^ maybe a missing `extern crate a_very_long_name;`? + | ^^^^^^^^^^^^^^^^ maybe a missing crate `a_very_long_name`? error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-36881.stderr b/src/test/ui/issues/issue-36881.stderr index 07d2c99d7d2de..caf9d5d6d6277 100644 --- a/src/test/ui/issues/issue-36881.stderr +++ b/src/test/ui/issues/issue-36881.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `issue_36881_aux` --> $DIR/issue-36881.rs:5:9 | LL | use issue_36881_aux::Foo; - | ^^^^^^^^^^^^^^^ maybe a missing `extern crate issue_36881_aux;`? + | ^^^^^^^^^^^^^^^ maybe a missing crate `issue_36881_aux`? error: aborting due to previous error diff --git a/src/test/ui/issues/issue-37887.stderr b/src/test/ui/issues/issue-37887.stderr index b1b9754523f67..6ef5359f9801e 100644 --- a/src/test/ui/issues/issue-37887.stderr +++ b/src/test/ui/issues/issue-37887.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `libc` --> $DIR/issue-37887.rs:3:9 | LL | use libc::*; - | ^^^^ maybe a missing `extern crate libc;`? + | ^^^^ maybe a missing crate `libc`? error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/issue-37887.rs:2:5 diff --git a/src/test/ui/macros/meta-item-absolute-path.stderr b/src/test/ui/macros/meta-item-absolute-path.stderr index 23933f730aae9..711fa4dd405bc 100644 --- a/src/test/ui/macros/meta-item-absolute-path.stderr +++ b/src/test/ui/macros/meta-item-absolute-path.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: maybe a missing `extern crate Absolute;`? +error[E0433]: failed to resolve: maybe a missing crate `Absolute`? --> $DIR/meta-item-absolute-path.rs:1:12 | LL | #[derive(::Absolute)] - | ^^^^^^^^ maybe a missing `extern crate Absolute;`? + | ^^^^^^^^ maybe a missing crate `Absolute`? error: aborting due to previous error diff --git a/src/test/ui/privacy/restricted/test.rs b/src/test/ui/privacy/restricted/test.rs index f208696c86fb7..a8c269378c2ee 100644 --- a/src/test/ui/privacy/restricted/test.rs +++ b/src/test/ui/privacy/restricted/test.rs @@ -47,6 +47,6 @@ fn main() { } mod pathological { - pub(in bad::path) mod m1 {} //~ ERROR failed to resolve: maybe a missing `extern crate bad;`? + pub(in bad::path) mod m1 {} //~ ERROR failed to resolve: maybe a missing crate `bad`? pub(in foo) mod m2 {} //~ ERROR visibilities can only be restricted to ancestor modules } diff --git a/src/test/ui/privacy/restricted/test.stderr b/src/test/ui/privacy/restricted/test.stderr index fa78ae759c737..a23973d0853f1 100644 --- a/src/test/ui/privacy/restricted/test.stderr +++ b/src/test/ui/privacy/restricted/test.stderr @@ -1,8 +1,8 @@ -error[E0433]: failed to resolve: maybe a missing `extern crate bad;`? +error[E0433]: failed to resolve: maybe a missing crate `bad`? --> $DIR/test.rs:50:12 | LL | pub(in bad::path) mod m1 {} - | ^^^ maybe a missing `extern crate bad;`? + | ^^^ maybe a missing crate `bad`? error: visibilities can only be restricted to ancestor modules --> $DIR/test.rs:51:12 diff --git a/src/test/ui/unresolved/unresolved-import.rs b/src/test/ui/unresolved/unresolved-import.rs index 4c7d4bb935331..b65c3dfb90b42 100644 --- a/src/test/ui/unresolved/unresolved-import.rs +++ b/src/test/ui/unresolved/unresolved-import.rs @@ -1,5 +1,5 @@ use foo::bar; //~ ERROR unresolved import `foo` [E0432] - //~^ maybe a missing `extern crate foo;`? + //~^ maybe a missing crate `foo`? use bar::Baz as x; //~ ERROR unresolved import `bar::Baz` [E0432] //~| no `Baz` in `bar` diff --git a/src/test/ui/unresolved/unresolved-import.stderr b/src/test/ui/unresolved/unresolved-import.stderr index fb5c0760d1582..d4bfea57809b0 100644 --- a/src/test/ui/unresolved/unresolved-import.stderr +++ b/src/test/ui/unresolved/unresolved-import.stderr @@ -2,7 +2,7 @@ error[E0432]: unresolved import `foo` --> $DIR/unresolved-import.rs:1:5 | LL | use foo::bar; - | ^^^ maybe a missing `extern crate foo;`? + | ^^^ maybe a missing crate `foo`? error[E0432]: unresolved import `bar::Baz` --> $DIR/unresolved-import.rs:4:5 diff --git a/src/test/ui/use/use-mod/use-mod-4.stderr b/src/test/ui/use/use-mod/use-mod-4.stderr index df9898844d34d..e30e5c3ceb162 100644 --- a/src/test/ui/use/use-mod/use-mod-4.stderr +++ b/src/test/ui/use/use-mod/use-mod-4.stderr @@ -14,7 +14,7 @@ error[E0432]: unresolved import `foo` --> $DIR/use-mod-4.rs:1:5 | LL | use foo::self; - | ^^^ maybe a missing `extern crate foo;`? + | ^^^ maybe a missing crate `foo`? error: aborting due to 3 previous errors diff --git a/src/tools/miri b/src/tools/miri index 39a524f694e42..b12ebfc3de853 160000 --- a/src/tools/miri +++ b/src/tools/miri @@ -1 +1 @@ -Subproject commit 39a524f694e42cfb178639d490d3fdbbaf8569dc +Subproject commit b12ebfc3de853abf6b4260c44a71cd51323803c5