diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 0f8ca4f2ceb..ff3efe719f4 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -256,9 +256,7 @@ impl Edition { /// Updates the given [`ProcessBuilder`] to include the appropriate flags /// for setting the edition. pub(crate) fn cmd_edition_arg(&self, cmd: &mut ProcessBuilder) { - if *self != Edition::Edition2015 { - cmd.arg(format!("--edition={}", self)); - } + cmd.arg(format!("--edition={}", self)); if !self.is_stable() { cmd.arg("-Z").arg("unstable-options"); } diff --git a/tests/testsuite/artifact_dep.rs b/tests/testsuite/artifact_dep.rs index 664e84647aa..1343fdf0070 100644 --- a/tests/testsuite/artifact_dep.rs +++ b/tests/testsuite/artifact_dep.rs @@ -1057,16 +1057,16 @@ fn build_script_deps_adopt_specified_target_unconditionally() { p.cargo("check -v -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_does_not_contain(format!( - "[RUNNING] `rustc --crate-name build_script_build build.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--target {} [..]", target )) - .with_stderr_contains("[RUNNING] `rustc --crate-name build_script_build build.rs [..]") + .with_stderr_contains("[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]") .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--target {} [..]", target )) .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/main.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..]--target {} [..]", target )) .with_stderr_does_not_contain(format!( @@ -1172,11 +1172,11 @@ fn non_build_script_deps_adopt_specified_target_unconditionally() { p.cargo("check -v -Z bindeps") .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--target {} [..]", target )) .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/main.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..]--target {} [..]", target )) .with_stderr_does_not_contain(format!( @@ -1251,8 +1251,8 @@ fn no_cross_doctests_works_with_artifacts() { .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_contains(format!( "[COMPILING] bar v0.5.0 ([CWD]/bar) -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--target {triple} [..] -[RUNNING] `rustc --crate-name bar bar/src/main.rs [..]--target {triple} [..] +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--target {triple} [..] +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..]--target {triple} [..] [COMPILING] foo v0.0.1 ([CWD]) [RUNNING] `rustc --crate-name foo [..] [FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [..]", @@ -1315,16 +1315,16 @@ fn build_script_deps_adopts_target_platform_if_target_equals_target() { .arg(alternate_target) .masquerade_as_nightly_cargo(&["bindeps"]) .with_stderr_does_not_contain(format!( - "[RUNNING] `rustc --crate-name build_script_build build.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--target {} [..]", alternate_target )) - .with_stderr_contains("[RUNNING] `rustc --crate-name build_script_build build.rs [..]") + .with_stderr_contains("[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]") .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--target {} [..]", alternate_target )) .with_stderr_contains(format!( - "[RUNNING] `rustc --crate-name bar bar/src/main.rs [..]--target {} [..]", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..]--target {} [..]", alternate_target )) .with_stderr_contains(format!( @@ -1373,16 +1373,16 @@ fn profile_override_basic() { "[RUNNING] `rustc --crate-name build_script_build [..] -C opt-level=1 [..]`", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name bar bar/src/main.rs [..] -C opt-level=3 [..]`", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..] -C opt-level=3 [..]`", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name bar bar/src/main.rs [..] -C opt-level=1 [..]`", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/main.rs [..] -C opt-level=1 [..]`", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..] -C opt-level=1 [..]`", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=1 [..]`", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..] -C opt-level=3 [..]`", + "[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=3 [..]`", ) .with_stderr_contains("[RUNNING] `rustc --crate-name foo [..] -C opt-level=3 [..]`") .run(); @@ -2567,10 +2567,10 @@ fn with_assumed_host_target_and_optional_build_dep() { "\ [COMPILING] foo v0.0.1 ([CWD]) [COMPILING] d1 v0.0.1 ([CWD]/d1) -[RUNNING] `rustc --crate-name build_script_build [..]--crate-type bin[..] -[RUNNING] `rustc --crate-name d1 [..]--crate-type bin[..] +[RUNNING] `rustc --crate-name build_script_build --edition=2021 [..]--crate-type bin[..] +[RUNNING] `rustc --crate-name d1 --edition=2021 [..]--crate-type bin[..] [RUNNING] `[CWD]/target/debug/build/foo-[..]/build-script-build` -[RUNNING] `rustc --crate-name foo [..]--cfg[..]d1[..] +[RUNNING] `rustc --crate-name foo --edition=2021 [..]--cfg[..]d1[..] [FINISHED] `dev` profile [..] ", ) diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 0dcb81bee3a..848dab1eb8c 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -1426,14 +1426,14 @@ fn cargo_default_env_metadata_env_var() { .with_stderr(&format!( "\ [COMPILING] bar v0.0.1 ([CWD]/bar) -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type dylib \ +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type dylib \ --emit=[..]link \ -C prefer-dynamic[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ -L dependency=[CWD]/target/debug/deps` [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ -C extra-filename=[..] \ @@ -1454,14 +1454,14 @@ fn cargo_default_env_metadata_env_var() { .with_stderr(&format!( "\ [COMPILING] bar v0.0.1 ([CWD]/bar) -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type dylib \ +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type dylib \ --emit=[..]link \ -C prefer-dynamic[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ -L dependency=[CWD]/target/debug/deps` [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ -C extra-filename=[..] \ @@ -2326,7 +2326,7 @@ fn lto_build() { .with_stderr( "\ [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/main.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name test --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link \ -C opt-level=3 \ -C lto \ @@ -2344,7 +2344,7 @@ fn verbose_build() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ @@ -2362,7 +2362,7 @@ fn verbose_release_build() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C opt-level=3[..]\ -C metadata=[..] \ @@ -2381,7 +2381,7 @@ fn verbose_release_build_short() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C opt-level=3[..]\ -C metadata=[..] \ @@ -2430,7 +2430,7 @@ fn verbose_release_build_deps() { .with_stderr(&format!( "\ [COMPILING] foo v0.0.0 ([CWD]/foo) -[RUNNING] `rustc --crate-name foo foo/src/lib.rs [..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]\ --crate-type dylib --crate-type rlib \ --emit=[..]link \ -C prefer-dynamic[..]\ @@ -2439,7 +2439,7 @@ fn verbose_release_build_deps() { --out-dir [..] \ -L dependency=[CWD]/target/release/deps` [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C opt-level=3[..]\ -C metadata=[..] \ @@ -5704,11 +5704,11 @@ fn build_filter_infer_profile() { p.cargo("build -v") .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) .run(); @@ -5716,15 +5716,15 @@ fn build_filter_infer_profile() { p.root().join("target").rm_rf(); p.cargo("build -v --test=t1") .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name t1 tests/t1.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name t1 --edition=2015 tests/t1.rs [..]--emit=[..]link[..]\ -C debuginfo=2 [..]", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]-C debuginfo=2 [..]", ) .run(); @@ -5733,16 +5733,16 @@ fn build_filter_infer_profile() { // Bench uses test profile without `--release`. p.cargo("build -v --bench=b1") .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name b1 benches/b1.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name b1 --edition=2015 benches/b1.rs [..]--emit=[..]link[..]\ -C debuginfo=2 [..]", ) .with_stderr_does_not_contain("opt-level") .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]-C debuginfo=2 [..]", ) .run(); @@ -5754,17 +5754,17 @@ fn targets_selected_default() { p.cargo("build -v") // Binaries. .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) // Benchmarks. .with_stderr_does_not_contain( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link \ -C opt-level=3 --test [..]", ) // Unit tests. .with_stderr_does_not_contain( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]\ -C debuginfo=2 --test [..]", ) .run(); @@ -5776,12 +5776,12 @@ fn targets_selected_all() { p.cargo("build -v --all-targets") // Binaries. .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) // Unit tests. .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]\ -C debuginfo=2 [..]--test [..]", ) .run(); @@ -5793,12 +5793,12 @@ fn all_targets_no_lib() { p.cargo("build -v --all-targets") // Binaries. .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) // Unit tests. .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]\ -C debuginfo=2 [..]--test [..]", ) .run(); @@ -6271,7 +6271,7 @@ fn build_lib_only() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 4d90da54960..87b8ab1a154 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -37,7 +37,7 @@ fn custom_build_script_failed() { .with_stderr( "\ [COMPILING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]` [RUNNING] `[..]/build-script-build` [ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])` @@ -74,7 +74,7 @@ fn custom_build_script_failed_backtraces_message() { .with_stderr( "\ [COMPILING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]` [RUNNING] `[..]/build-script-build` [ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])` note: To improve backtraces for build dependencies, set the \ @@ -129,7 +129,7 @@ fn custom_build_script_failed_backtraces_message_with_debuginfo() { .with_stderr( "\ [COMPILING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]` [RUNNING] `[..]/build-script-build` [ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])` @@ -514,7 +514,7 @@ fn custom_build_env_var_rustc_linker_bad_host_target() { .with_stderr_contains( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/linker [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/linker [..]` [ERROR] linker `[..]/path/to/linker` not found " ) @@ -652,7 +652,7 @@ fn custom_build_linker_host_target_with_bad_host_config() { .with_stderr_contains( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` [ERROR] linker `[..]/path/to/host/linker` not found " ) @@ -687,7 +687,7 @@ fn custom_build_linker_bad_host() { .with_stderr_contains( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` [ERROR] linker `[..]/path/to/host/linker` not found " ) @@ -724,7 +724,7 @@ fn custom_build_linker_bad_host_with_arch() { .with_stderr_contains( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/arch/linker [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/arch/linker [..]` [ERROR] linker `[..]/path/to/host/arch/linker` not found " ) @@ -800,7 +800,7 @@ fn custom_build_linker_bad_cross_arch_host() { .with_stderr_contains( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin [..]-C linker=[..]/path/to/host/linker [..]` [ERROR] linker `[..]/path/to/host/linker` not found " ) @@ -880,13 +880,13 @@ fn custom_build_script_rustc_flags() { .with_stderr( "\ [COMPILING] foo [..] -[RUNNING] `rustc --crate-name build_script_build foo/build.rs [..] +[RUNNING] `rustc --crate-name build_script_build --edition=2015 foo/build.rs [..] [RUNNING] `[..]build-script-build` -[RUNNING] `rustc --crate-name foo foo/src/lib.rs [..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]\ -L dependency=[CWD]/target/debug/deps \ -L /dummy/path1 -L /dummy/path2 -l nonexistinglib` [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar src/main.rs [..]\ +[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]\ -L dependency=[CWD]/target/debug/deps \ --extern foo=[..]libfoo-[..] \ -L /dummy/path1 -L /dummy/path2` @@ -939,13 +939,13 @@ fn custom_build_script_rustc_flags_no_space() { .with_stderr( "\ [COMPILING] foo [..] -[RUNNING] `rustc --crate-name build_script_build foo/build.rs [..] +[RUNNING] `rustc --crate-name build_script_build --edition=2015 foo/build.rs [..] [RUNNING] `[..]build-script-build` -[RUNNING] `rustc --crate-name foo foo/src/lib.rs [..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]\ -L dependency=[CWD]/target/debug/deps \ -L /dummy/path1 -L /dummy/path2 -l nonexistinglib` [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar src/main.rs [..]\ +[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]\ -L dependency=[CWD]/target/debug/deps \ --extern foo=[..]libfoo-[..] \ -L /dummy/path1 -L /dummy/path2` @@ -1786,7 +1786,7 @@ fn build_cmd_with_a_build_cmd() { --out-dir [..]target/debug/deps \ -L [..]target/debug/deps` [COMPILING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name build_script_build build.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin \ --emit=[..]link[..]\ -C metadata=[..] --out-dir [..] \ -L [..]target/debug/deps \ diff --git a/tests/testsuite/build_script_extra_link_arg.rs b/tests/testsuite/build_script_extra_link_arg.rs index 0afcb968d60..bcd4967cb7b 100644 --- a/tests/testsuite/build_script_extra_link_arg.rs +++ b/tests/testsuite/build_script_extra_link_arg.rs @@ -202,16 +202,16 @@ fn cdylib_link_arg_transitive() { .with_stderr_contains( "\ [COMPILING] bar v1.0.0 [..] -[RUNNING] `rustc --crate-name build_script_build bar/build.rs [..] +[RUNNING] `rustc --crate-name build_script_build --edition=2015 bar/build.rs [..] [RUNNING] `[..]build-script-build[..] warning: bar@1.0.0: cargo::rustc-link-arg-cdylib was specified in the build script of bar v1.0.0 \ ([ROOT]/foo/bar), but that package does not contain a cdylib target Allowing this was an unintended change in the 1.50 release, and may become an error in \ the future. For more information, see . -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..] +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] [COMPILING] foo v0.1.0 [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..]-C link-arg=--bogus[..]` +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]-C link-arg=--bogus[..]` ", ) .run(); @@ -265,7 +265,7 @@ fn link_arg_transitive_not_allowed() { [RUNNING] `[..]/build-script-build[..] [RUNNING] `rustc --crate-name bar [..] [COMPILING] foo v0.1.0 [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] [FINISHED] `dev` profile [..] ", ) diff --git a/tests/testsuite/cache_messages.rs b/tests/testsuite/cache_messages.rs index d4bb6dbc42e..0cd39c9c606 100644 --- a/tests/testsuite/cache_messages.rs +++ b/tests/testsuite/cache_messages.rs @@ -437,7 +437,9 @@ fn rustc_workspace_wrapper() { p.cargo("check -v") .env("RUSTC_WORKSPACE_WRAPPER", tools::echo_wrapper()) - .with_stderr_contains("WRAPPER CALLED: rustc --crate-name foo src/lib.rs [..]") + .with_stderr_contains( + "WRAPPER CALLED: rustc --crate-name foo --edition=2015 src/lib.rs [..]", + ) .run(); // Check without a wrapper should rebuild @@ -449,21 +451,27 @@ fn rustc_workspace_wrapper() { [WARNING] [..]unused_func[..] ", ) - .with_stdout_does_not_contain("WRAPPER CALLED: rustc --crate-name foo src/lib.rs [..]") + .with_stdout_does_not_contain( + "WRAPPER CALLED: rustc --crate-name foo --edition=2015 src/lib.rs [..]", + ) .run(); // Again, reading from the cache. p.cargo("check -v") .env("RUSTC_WORKSPACE_WRAPPER", tools::echo_wrapper()) .with_stderr_contains("[FRESH] foo [..]") - .with_stdout_does_not_contain("WRAPPER CALLED: rustc --crate-name foo src/lib.rs [..]") + .with_stdout_does_not_contain( + "WRAPPER CALLED: rustc --crate-name foo --edition=2015 src/lib.rs [..]", + ) .run(); // And `check` should also be fresh, reading from cache. p.cargo("check -v") .with_stderr_contains("[FRESH] foo [..]") .with_stderr_contains("[WARNING] [..]unused_func[..]") - .with_stdout_does_not_contain("WRAPPER CALLED: rustc --crate-name foo src/lib.rs [..]") + .with_stdout_does_not_contain( + "WRAPPER CALLED: rustc --crate-name foo --edition=2015 src/lib.rs [..]", + ) .run(); } diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 2deeaf09889..5608e2ddc84 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -410,10 +410,10 @@ fn check_all() { .build(); p.cargo("check --workspace -v") - .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") - .with_stderr_contains("[..] --crate-name b b/src/lib.rs [..]") - .with_stderr_contains("[..] --crate-name b b/src/main.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/main.rs [..]") + .with_stderr_contains("[..] --crate-name b [..] b/src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name b [..] b/src/main.rs [..]") .run(); } @@ -488,8 +488,8 @@ fn check_virtual_all_implied() { .build(); p.cargo("check -v") - .with_stderr_contains("[..] --crate-name bar bar/src/lib.rs [..]") - .with_stderr_contains("[..] --crate-name baz baz/src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name bar [..] bar/src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name baz [..] baz/src/lib.rs [..]") .run(); } @@ -573,11 +573,11 @@ fn targets_selected_default() { .build(); foo.cargo("check -v") - .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name example1 examples/example1.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name test2 tests/test2.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name bench3 benches/bench3.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/main.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name example1 [..] examples/example1.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name test2 [..] tests/test2.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name bench3 [..] benches/bench3.rs [..]") .run(); } @@ -592,11 +592,11 @@ fn targets_selected_all() { .build(); foo.cargo("check --all-targets -v") - .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") - .with_stderr_contains("[..] --crate-name example1 examples/example1.rs [..]") - .with_stderr_contains("[..] --crate-name test2 tests/test2.rs [..]") - .with_stderr_contains("[..] --crate-name bench3 benches/bench3.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/main.rs [..]") + .with_stderr_contains("[..] --crate-name example1 [..] examples/example1.rs [..]") + .with_stderr_contains("[..] --crate-name test2 [..] tests/test2.rs [..]") + .with_stderr_contains("[..] --crate-name bench3 [..] benches/bench3.rs [..]") .run(); } @@ -692,9 +692,9 @@ fn check_filters() { .run(); p.root().join("target").rm_rf(); p.cargo("check --tests -v") - .with_stderr_contains("[..] --crate-name foo src/lib.rs [..] --test [..]") - .with_stderr_contains("[..] --crate-name foo src/lib.rs [..] --crate-type lib [..]") - .with_stderr_contains("[..] --crate-name foo src/main.rs [..] --test [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/lib.rs [..] --test [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/lib.rs [..] --crate-type lib [..]") + .with_stderr_contains("[..] --crate-name foo [..] src/main.rs [..] --test [..]") .with_stderr_contains("[..]unused_unit_lib[..]") .with_stderr_contains("[..]unused_unit_bin[..]") .with_stderr_contains("[..]unused_normal_lib[..]") diff --git a/tests/testsuite/cross_compile.rs b/tests/testsuite/cross_compile.rs index c2b4261e5fb..54edbaf3dfc 100644 --- a/tests/testsuite/cross_compile.rs +++ b/tests/testsuite/cross_compile.rs @@ -397,7 +397,7 @@ fn linker() { .with_stderr_contains(&format!( "\ [COMPILING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name foo src/foo.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/foo.rs [..]--crate-type bin \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [CWD]/target/{target}/debug/deps \ @@ -1255,7 +1255,7 @@ fn doctest_xcompile_linker() { .masquerade_as_nightly_cargo(&["doctest-xcompile"]) .with_stderr_contains(&format!( "\ -[RUNNING] `rustdoc --crate-type lib --crate-name foo --test [..]\ +[RUNNING] `rustdoc --edition=2015 --crate-type lib --crate-name foo --test [..]\ --target {target} [..] -C linker=my-linker-tool[..] ", target = target, diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs index ef556a1f070..b9fe0a72ccd 100644 --- a/tests/testsuite/doc.rs +++ b/tests/testsuite/doc.rs @@ -1365,7 +1365,7 @@ fn doc_extern_map_local() { .with_stderr( "\ [DOCUMENTING] foo v0.1.0 [..] -[RUNNING] `rustdoc --crate-type lib --crate-name foo src/lib.rs [..]--crate-version 0.1.0` +[RUNNING] `rustdoc --edition=2015 --crate-type lib --crate-name foo src/lib.rs [..]--crate-version 0.1.0` [FINISHED] [..] Opening [CWD]/target/doc/foo/index.html ", @@ -2036,7 +2036,7 @@ fn crate_versions() { .with_stderr( "\ [DOCUMENTING] foo v1.2.4 [..] -[RUNNING] `rustdoc --crate-type lib --crate-name foo src/lib.rs [..]--crate-version 1.2.4` +[RUNNING] `rustdoc --edition=2015 --crate-type lib --crate-name foo src/lib.rs [..]--crate-version 1.2.4` [FINISHED] [..] [GENERATED] [CWD]/target/doc/foo/index.html ", @@ -2508,8 +2508,8 @@ fn lib_before_bin() { .with_stderr( "\ [DOCUMENTING] foo [..] -[RUNNING] `rustdoc --crate-type lib --crate-name foo src/lib.rs [..] -[RUNNING] `rustdoc --crate-type bin --crate-name somebin src/bin/somebin.rs [..] +[RUNNING] `rustdoc --edition=2015 --crate-type lib --crate-name foo src/lib.rs [..] +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name somebin src/bin/somebin.rs [..] [FINISHED] [..] [GENERATED] [CWD]/target/doc/foo/index.html [GENERATED] [CWD]/target/doc/somebin/index.html diff --git a/tests/testsuite/features2.rs b/tests/testsuite/features2.rs index e2363233a00..3bd41ae159e 100644 --- a/tests/testsuite/features2.rs +++ b/tests/testsuite/features2.rs @@ -1116,7 +1116,10 @@ fn proc_macro_ws() { // Selecting just foo will build without unification. p.cargo("check -p foo -v") // Make sure `foo` is built without feat1 - .with_stderr_line_without(&["[RUNNING] `rustc --crate-name foo"], &["--cfg[..]feat1"]) + .with_stderr_line_without( + &["[RUNNING] `rustc --crate-name foo --edition=2015"], + &["--cfg[..]feat1"], + ) .run(); } diff --git a/tests/testsuite/freshness.rs b/tests/testsuite/freshness.rs index 11a1b1c76f7..51c84b8aef7 100644 --- a/tests/testsuite/freshness.rs +++ b/tests/testsuite/freshness.rs @@ -1424,7 +1424,7 @@ fn reuse_panic_build_dep_test() { [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build [..] [RUNNING] [..]build-script-build` -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--test[..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--test[..] [FINISHED] [..] [EXECUTABLE] `[..]/target/debug/deps/foo-[..][EXE]` ", @@ -1478,12 +1478,12 @@ fn reuse_panic_pm() { .with_stderr_unordered( "\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..] -[RUNNING] `rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..] +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C debuginfo=2 [..] [COMPILING] somepm [..] [RUNNING] `rustc --crate-name somepm [..] [COMPILING] foo [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..]-C panic=abort[..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]-C panic=abort[..] [FINISHED] [..] ", ) @@ -2779,7 +2779,9 @@ fn verify_source_before_recompile() { ); // Sanity check: vendoring works correctly. p.cargo("check --verbose") - .with_stderr_contains("[RUNNING] `rustc --crate-name bar [CWD]/vendor/bar/src/lib.rs[..]") + .with_stderr_contains( + "[RUNNING] `rustc --crate-name bar --edition=2015 [CWD]/vendor/bar/src/lib.rs[..]", + ) .run(); // Now modify vendored crate. p.change_file( @@ -2830,7 +2832,7 @@ fn skip_mtime_check_in_selected_cargo_home_subdirs() { .with_stderr( "\ [CHECKING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] [FINISHED] `dev` profile [..]", ) .run(); @@ -2859,7 +2861,7 @@ fn use_mtime_cache_in_cargo_home() { .with_stderr( "\ [CHECKING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] [FINISHED] `dev` profile [..]", ) .run(); @@ -2870,7 +2872,7 @@ fn use_mtime_cache_in_cargo_home() { "\ [DIRTY] foo v0.5.0 ([CWD]): [..] [CHECKING] foo v0.5.0 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]", +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]", ) .run_expect_error(); } diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index bb48e24b76c..3905288e6d5 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -2491,7 +2491,7 @@ fn include_overrides_gitignore() { [DIRTY] foo v0.5.0 ([..]): the precalculated components changed [COMPILING] foo v0.5.0 ([..]) [RUNNING] `[..]build-script-build[..]` -[RUNNING] `rustc --crate-name foo src/lib.rs [..]` +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) diff --git a/tests/testsuite/glob_targets.rs b/tests/testsuite/glob_targets.rs index 9db98f36c8e..f26cc90dc2d 100644 --- a/tests/testsuite/glob_targets.rs +++ b/tests/testsuite/glob_targets.rs @@ -135,7 +135,7 @@ fn doc_bin() { .with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([CWD]) -[RUNNING] `rustdoc --crate-type bin --crate-name bin1 [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name bin1 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [GENERATED] [CWD]/target/doc/bin1/index.html ", @@ -406,7 +406,7 @@ fn rustdoc_example() { .with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([CWD]) -[RUNNING] `rustdoc --crate-type bin --crate-name example1 [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name example1 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [GENERATED] [CWD]/target/doc/example1/index.html ", @@ -421,7 +421,7 @@ fn rustdoc_bin() { .with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([CWD]) -[RUNNING] `rustdoc --crate-type bin --crate-name bin1 [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name bin1 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [GENERATED] [CWD]/target/doc/bin1/index.html ", @@ -436,7 +436,7 @@ fn rustdoc_bench() { .with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([CWD]) -[RUNNING] `rustdoc --crate-type bin --crate-name bench1 [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name bench1 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [GENERATED] [CWD]/target/doc/bench1/index.html ", @@ -451,7 +451,7 @@ fn rustdoc_test() { .with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([CWD]) -[RUNNING] `rustdoc --crate-type bin --crate-name test1 [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type bin --crate-name test1 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [GENERATED] [CWD]/target/doc/test1/index.html ", diff --git a/tests/testsuite/lto.rs b/tests/testsuite/lto.rs index 528521ec9cf..3cacfcbcca3 100644 --- a/tests/testsuite/lto.rs +++ b/tests/testsuite/lto.rs @@ -258,8 +258,8 @@ fn off_in_manifest_works() { [COMPILING] bar v0.0.1 [RUNNING] `rustc --crate-name bar [..]--crate-type lib [..]-C lto=off -C embed-bitcode=no[..] [COMPILING] test [..] -[RUNNING] `rustc --crate-name test [..]--crate-type lib [..]-C lto=off -C embed-bitcode=no[..] -[RUNNING] `rustc --crate-name test src/main.rs [..]--crate-type bin [..]-C lto=off[..] +[RUNNING] `rustc --crate-name test[..]--crate-type lib [..]-C lto=off -C embed-bitcode=no[..] +[RUNNING] `rustc --crate-name test --edition=2015 src/main.rs [..]--crate-type bin [..]-C lto=off[..] [FINISHED] [..] ", ) @@ -540,7 +540,7 @@ fn cdylib_and_rlib() { [RUNNING] [..]target/release/deps/bar-[..] [RUNNING] [..]target/release/deps/b-[..] [DOCTEST] bar -[RUNNING] `rustdoc --crate-type cdylib --crate-type rlib --crate-name bar --test [..]-C lto[..] +[RUNNING] `rustdoc --edition=2015 --crate-type cdylib --crate-type rlib --crate-name bar --test [..]-C lto[..] ", ) .run(); @@ -807,7 +807,7 @@ fn fresh_swapping_commands() { [COMPILING] bar v1.0.0 [RUNNING] `rustc --crate-name bar [..]-C linker-plugin-lto[..] [COMPILING] foo v0.1.0 [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..]-C linker-plugin-lto[..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]-C linker-plugin-lto[..] [FINISHED] [..] ", ) @@ -817,7 +817,7 @@ fn fresh_swapping_commands() { "\ [FRESH] bar v1.0.0 [COMPILING] foo v0.1.0 [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..]-C lto[..]--test[..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]-C lto[..]--test[..] [FINISHED] [..] [RUNNING] `[..]/foo[..]` [DOCTEST] foo diff --git a/tests/testsuite/profile_overrides.rs b/tests/testsuite/profile_overrides.rs index ac03f14f540..5319b04794c 100644 --- a/tests/testsuite/profile_overrides.rs +++ b/tests/testsuite/profile_overrides.rs @@ -215,17 +215,17 @@ fn profile_override_hierarchy() { p.cargo("build -v").with_stderr_unordered("\ [COMPILING] m3 [..] [COMPILING] dep [..] -[RUNNING] `rustc --crate-name m3 m3/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=4 [..] -[RUNNING] `rustc --crate-name dep [..]dep/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=3 [..] -[RUNNING] `rustc --crate-name m3 m3/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=1 [..] -[RUNNING] `rustc --crate-name build_script_build m1/build.rs [..] --crate-type bin --emit=[..]link[..]-C codegen-units=4 [..] +[RUNNING] `rustc --crate-name m3 --edition=2015 m3/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=4 [..] +[RUNNING] `rustc --crate-name dep[..]dep/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=3 [..] +[RUNNING] `rustc --crate-name m3 --edition=2015 m3/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=1 [..] +[RUNNING] `rustc --crate-name build_script_build --edition=2015 m1/build.rs [..] --crate-type bin --emit=[..]link[..]-C codegen-units=4 [..] [COMPILING] m2 [..] -[RUNNING] `rustc --crate-name build_script_build m2/build.rs [..] --crate-type bin --emit=[..]link[..]-C codegen-units=2 [..] +[RUNNING] `rustc --crate-name build_script_build --edition=2015 m2/build.rs [..] --crate-type bin --emit=[..]link[..]-C codegen-units=2 [..] [RUNNING] `[..]/m1-[..]/build-script-build` [RUNNING] `[..]/m2-[..]/build-script-build` -[RUNNING] `rustc --crate-name m2 m2/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=2 [..] +[RUNNING] `rustc --crate-name m2 --edition=2015 m2/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=2 [..] [COMPILING] m1 [..] -[RUNNING] `rustc --crate-name m1 m1/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=1 [..] +[RUNNING] `rustc --crate-name m1 --edition=2015 m1/src/lib.rs [..] --crate-type lib --emit=[..]link[..]-C codegen-units=1 [..] [FINISHED] `dev` profile [unoptimized + debuginfo] [..] ", ) @@ -437,7 +437,7 @@ fn override_proc_macro() { .with_stderr_contains("[RUNNING] `rustc [..]--crate-name shared [..]-C codegen-units=4[..]") // Shared built for the library. .with_stderr_line_without( - &["[RUNNING] `rustc --crate-name shared"], + &["[RUNNING] `rustc --crate-name shared --edition=2015"], &["-C codegen-units"], ) .with_stderr_contains("[RUNNING] `rustc [..]--crate-name pm [..]-C codegen-units=4[..]") diff --git a/tests/testsuite/profile_targets.rs b/tests/testsuite/profile_targets.rs index 5e19bcf48b7..6d3556df894 100644 --- a/tests/testsuite/profile_targets.rs +++ b/tests/testsuite/profile_targets.rs @@ -87,16 +87,16 @@ fn profile_selection_build() { p.cargo("build -vv") .with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] [FINISHED] `dev` profile [unoptimized + debuginfo] [..] " ) @@ -121,16 +121,16 @@ fn profile_selection_build_release() { // `build --release` p.cargo("build --release -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] [RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] [FINISHED] `release` profile [optimized] [..] ").run(); p.cargo("build --release -vv") @@ -181,23 +181,23 @@ fn profile_selection_build_all_targets() { p.cargo("build --all-targets -vv") .with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]link[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] [..] " ) @@ -250,23 +250,23 @@ fn profile_selection_build_all_targets_release() { // example release build p.cargo("build --all-targets --release -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] [RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..]` -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..]` +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..]` +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..]` [FINISHED] `release` profile [optimized] [..] ").run(); p.cargo("build --all-targets --release -vv") @@ -307,22 +307,22 @@ fn profile_selection_test() { // p.cargo("test -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C panic=abort[..]-C codegen-units=3 -C debuginfo=2 [..] [FINISHED] `test` profile [unoptimized + debuginfo] [..] [RUNNING] `[..]/deps/foo-[..]` [RUNNING] `[..]/deps/foo-[..]` @@ -374,22 +374,22 @@ fn profile_selection_test_release() { // p.cargo("test --release -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C opt-level=3[..]-C codegen-units=2[..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C opt-level=3[..]-C codegen-units=2[..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] [RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]link -C opt-level=3[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] [FINISHED] `release` profile [optimized] [..] [RUNNING] `[..]/deps/foo-[..]` [RUNNING] `[..]/deps/foo-[..]` @@ -440,21 +440,21 @@ fn profile_selection_bench() { // p.cargo("bench -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=4 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=4 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] [RUNNING] `[..]target/release/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=4 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..]-C codegen-units=4 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link -C opt-level=3[..]-C codegen-units=4 --test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link -C opt-level=3 -C panic=abort[..]-C codegen-units=4 [..] [FINISHED] `bench` profile [optimized] [..] [RUNNING] `[..]/deps/foo-[..] --bench` [RUNNING] `[..]/deps/foo-[..] --bench` @@ -505,23 +505,23 @@ fn profile_selection_check_all_targets() { // p.cargo("check --all-targets -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep[..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=1 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] [FINISHED] `dev` profile [unoptimized + debuginfo] [..] ").run(); // Starting with Rust 1.27, rustc emits `rmeta` files for bins, so @@ -550,23 +550,23 @@ fn profile_selection_check_all_targets_release() { // `dev` for all targets. p.cargo("check --all-targets --release -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] [COMPILING] bdep[..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link [..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link [..]-C codegen-units=6 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=6 [..] [RUNNING] `[..]target/release/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--crate-type bin --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--crate-type bin --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]metadata -C opt-level=3[..]-C codegen-units=2 --test [..] +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type bin --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]metadata -C opt-level=3 -C panic=abort[..]-C codegen-units=2 [..] [FINISHED] `release` profile [optimized] [..] ").run(); @@ -609,20 +609,20 @@ fn profile_selection_check_all_targets_test() { // p.cargo("check --all-targets --profile=test -vv").with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] [COMPILING] bdep[..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] -[RUNNING] `[..] rustc --crate-name foo src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name test1 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name foo src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name bench1 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] -[RUNNING] `[..] rustc --crate-name ex1 examples/ex1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/lib.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name test1 --edition=2015 tests/test1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name bench1 --edition=2015 benches/bench1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] +[RUNNING] `[..] rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--emit=[..]metadata[..]-C codegen-units=3 -C debuginfo=2 [..]--test [..] [FINISHED] `test` profile [unoptimized + debuginfo] [..] ").run(); @@ -655,13 +655,13 @@ fn profile_selection_doc() { p.cargo("doc -vv").with_stderr_unordered("\ [COMPILING] bar [..] [DOCUMENTING] bar [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `rustdoc [..]--crate-name bar bar/src/lib.rs [..] -[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `[..] rustc --crate-name bar --edition=2015 bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort[..]-C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name bdep --edition=2015 bdep/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C codegen-units=5 [..] [COMPILING] foo [..] -[RUNNING] `[..] rustc --crate-name build_script_build build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] +[RUNNING] `[..] rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C codegen-units=5 [..] [RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` [foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 [DOCUMENTING] foo [..] diff --git a/tests/testsuite/profiles.rs b/tests/testsuite/profiles.rs index 7aebb4f7abb..941dc7e56b0 100644 --- a/tests/testsuite/profiles.rs +++ b/tests/testsuite/profiles.rs @@ -28,7 +28,7 @@ fn profile_overrides() { .with_stderr( "\ [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C opt-level=1[..]\ -C debug-assertions=on \ @@ -64,7 +64,7 @@ fn opt_level_override_0() { .with_stderr( "\ [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C debuginfo=2 [..]\ -C metadata=[..] \ @@ -97,7 +97,7 @@ fn debug_override_1() { .with_stderr( "\ [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C debuginfo=1 [..]\ -C metadata=[..] \ @@ -133,7 +133,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) { .with_stderr(&format!( "\ [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link \ -C opt-level={level}[..]\ -C debuginfo=2 [..]\ @@ -206,7 +206,7 @@ fn top_level_overrides_deps() { .with_stderr(&format!( "\ [COMPILING] foo v0.0.0 ([CWD]/foo) -[RUNNING] `rustc --crate-name foo foo/src/lib.rs [..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]\ --crate-type dylib --crate-type rlib \ --emit=[..]link \ -C prefer-dynamic \ @@ -216,7 +216,7 @@ fn top_level_overrides_deps() { --out-dir [CWD]/target/release/deps \ -L dependency=[CWD]/target/release/deps` [COMPILING] test v0.0.0 ([CWD]) -[RUNNING] `rustc --crate-name test src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link \ -C opt-level=1[..]\ -C debuginfo=2 [..]\ @@ -431,11 +431,11 @@ fn panic_unwind_does_not_build_twice() { .with_stderr_unordered( "\ [COMPILING] foo [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..] --test [..] -[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin [..] -[RUNNING] `rustc --crate-name foo src/main.rs [..] --test [..] -[RUNNING] `rustc --crate-name t1 tests/t1.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] --test [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..] --test [..] +[RUNNING] `rustc --crate-name t1 --edition=2015 tests/t1.rs [..] [FINISHED] [..] [EXECUTABLE] `[..]/target/debug/deps/t1-[..][EXE]` [EXECUTABLE] `[..]/target/debug/deps/foo-[..][EXE]` @@ -467,7 +467,7 @@ fn debug_0_report() { .with_stderr( "\ [COMPILING] foo v0.1.0 [..] -[RUNNING] `rustc --crate-name foo src/lib.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] [FINISHED] `dev` profile [unoptimized] target(s) in [..] ", ) diff --git a/tests/testsuite/publish_lockfile.rs b/tests/testsuite/publish_lockfile.rs index f52775e0cd8..eea5c755123 100644 --- a/tests/testsuite/publish_lockfile.rs +++ b/tests/testsuite/publish_lockfile.rs @@ -144,7 +144,7 @@ src/main.rs [ARCHIVING] src/main.rs [VERIFYING] foo v0.0.1 ([..]) [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc --crate-name foo src/main.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [PACKAGED] 5 files, [..] ([..] compressed) ", @@ -468,7 +468,7 @@ src/main.rs [ARCHIVING] src/main.rs [VERIFYING] foo v0.0.1 ([..]) [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc --crate-name foo src/main.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] [PACKAGED] 5 files, [..] ([..] compressed) ", diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 1caf804f70e..f271fedc255 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -785,7 +785,7 @@ fn example_with_release_flag() { .with_stderr( "\ [COMPILING] bar v0.5.0 ([CWD]/bar) -[RUNNING] `rustc --crate-name bar bar/src/bar.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib \ --emit=[..]link \ -C opt-level=3[..]\ -C metadata=[..] \ @@ -793,7 +793,7 @@ fn example_with_release_flag() { -C strip=debuginfo \ -L dependency=[CWD]/target/release/deps` [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name a examples/a.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin \ --emit=[..]link \ -C opt-level=3[..]\ -C metadata=[..] \ @@ -816,14 +816,14 @@ fast2", .with_stderr( "\ [COMPILING] bar v0.5.0 ([CWD]/bar) -[RUNNING] `rustc --crate-name bar bar/src/bar.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib \ --emit=[..]link[..]\ -C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [CWD]/target/debug/deps \ -L dependency=[CWD]/target/debug/deps` [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name a examples/a.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin \ --emit=[..]link[..]\ -C debuginfo=2 [..]\ -C metadata=[..] \ diff --git a/tests/testsuite/rustc.rs b/tests/testsuite/rustc.rs index b16e097249e..8b18bf928de 100644 --- a/tests/testsuite/rustc.rs +++ b/tests/testsuite/rustc.rs @@ -17,7 +17,7 @@ fn build_lib_for_foo() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ @@ -39,7 +39,7 @@ fn lib() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C debug-assertions=off \ -C metadata=[..] \ @@ -62,12 +62,12 @@ fn build_main_and_allow_unstable_options() { .with_stderr(format!( "\ [COMPILING] {name} v{version} ([CWD]) -[RUNNING] `rustc --crate-name {name} src/lib.rs [..]--crate-type lib \ +[RUNNING] `rustc --crate-name {name} --edition=2015 src/lib.rs [..]--crate-type lib \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C metadata=[..] \ --out-dir [..] \ -L dependency=[CWD]/target/debug/deps` -[RUNNING] `rustc --crate-name {name} src/main.rs [..]--crate-type bin \ +[RUNNING] `rustc --crate-name {name} --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]-C debuginfo=2 [..]\ -C debug-assertions \ -C metadata=[..] \ @@ -108,10 +108,10 @@ fn build_with_args_to_one_of_multiple_binaries() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]\ -C debuginfo=2 [..]-C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc --crate-name bar src/bin/bar.rs [..]--crate-type bin --emit=[..]link[..]\ +[RUNNING] `rustc --crate-name bar --edition=2015 src/bin/bar.rs [..]--crate-type bin --emit=[..]link[..]\ -C debuginfo=2 [..]-C debug-assertions [..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", @@ -206,7 +206,7 @@ fn build_with_crate_type_for_foo() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -243,9 +243,9 @@ fn build_with_crate_type_for_foo_with_deps() { .with_stderr( "\ [COMPILING] a v0.1.0 ([CWD]/a) -[RUNNING] `rustc --crate-name a a/src/lib.rs [..]--crate-type lib [..] +[RUNNING] `rustc --crate-name a --edition=2015 a/src/lib.rs [..]--crate-type lib [..] [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -260,7 +260,7 @@ fn build_with_crate_types_for_foo() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib,cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib,cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -291,8 +291,8 @@ fn build_with_crate_type_to_example() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib [..] -[RUNNING] `rustc --crate-name ex examples/ex.rs [..]--crate-type cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib [..] +[RUNNING] `rustc --crate-name ex --edition=2015 examples/ex.rs [..]--crate-type cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -323,8 +323,8 @@ fn build_with_crate_types_to_example() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib [..] -[RUNNING] `rustc --crate-name ex examples/ex.rs [..]--crate-type lib,cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib [..] +[RUNNING] `rustc --crate-name ex --edition=2015 examples/ex.rs [..]--crate-type lib,cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -359,8 +359,8 @@ fn build_with_crate_types_to_one_of_multi_examples() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib [..] -[RUNNING] `rustc --crate-name ex1 examples/ex1.rs [..]--crate-type lib,cdylib [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib [..] +[RUNNING] `rustc --crate-name ex1 --edition=2015 examples/ex1.rs [..]--crate-type lib,cdylib [..] [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", ) @@ -380,10 +380,10 @@ fn build_with_args_to_one_of_multiple_tests() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..]--crate-type lib --emit=[..]link[..]\ +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]\ -C debuginfo=2 [..]-C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc --crate-name bar tests/bar.rs [..]--emit=[..]link[..]-C debuginfo=2 [..]\ +[RUNNING] `rustc --crate-name bar --edition=2015 tests/bar.rs [..]--emit=[..]link[..]-C debuginfo=2 [..]\ -C debug-assertions [..]--test[..]` [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..] ", @@ -467,17 +467,17 @@ fn targets_selected_default() { p.cargo("rustc -v") // bin .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) // bench .with_stderr_does_not_contain( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link \ -C opt-level=3 --test [..]", ) // unit test .with_stderr_does_not_contain( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link \ -C debuginfo=2 [..]--test [..]", ) .run(); @@ -489,12 +489,12 @@ fn targets_selected_all() { p.cargo("rustc -v --all-targets") // bin .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--crate-type bin \ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin \ --emit=[..]link[..]", ) // unit test .with_stderr_contains( - "[RUNNING] `rustc --crate-name foo src/main.rs [..]--emit=[..]link[..]\ + "[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--emit=[..]link[..]\ -C debuginfo=2 [..]--test [..]", ) .run(); @@ -681,12 +681,12 @@ fn rustc_test_with_implicit_bin() { p.cargo("rustc --test test1 -v -- --cfg foo") .with_stderr_contains( "\ -[RUNNING] `rustc --crate-name test1 tests/test1.rs [..] --cfg foo [..] +[RUNNING] `rustc --crate-name test1 --edition=2015 tests/test1.rs [..] --cfg foo [..] ", ) .with_stderr_contains( "\ -[RUNNING] `rustc --crate-name foo src/main.rs [..] +[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..] ", ) .run(); diff --git a/tests/testsuite/rustdoc.rs b/tests/testsuite/rustdoc.rs index 9026bf63f3d..b189d2d12f1 100644 --- a/tests/testsuite/rustdoc.rs +++ b/tests/testsuite/rustdoc.rs @@ -288,7 +288,7 @@ fn proc_macro_crate_type() { p.cargo("rustdoc --verbose") .with_stderr_contains( "\ -[RUNNING] `rustdoc --crate-type proc-macro [..]` +[RUNNING] `rustdoc --edition=2015 --crate-type proc-macro [..]` ", ) .run(); diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index 44a830134f5..5699830c4ba 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -1778,10 +1778,10 @@ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out[..] .with_stderr_unordered( "\ [COMPILING] foo v0.0.1 ([CWD]) -[RUNNING] `rustc --crate-name foo src/lib.rs [..] --crate-type lib [..]` -[RUNNING] `rustc --crate-name foo src/lib.rs [..] --test [..]` -[RUNNING] `rustc --crate-name mybin src/bin/mybin.rs [..] --crate-type bin [..]` -[RUNNING] `rustc --crate-name mytest tests/mytest.rs [..] --test [..]` +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] --crate-type lib [..]` +[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..] --test [..]` +[RUNNING] `rustc --crate-name mybin --edition=2015 src/bin/mybin.rs [..] --crate-type bin [..]` +[RUNNING] `rustc --crate-name mytest --edition=2015 tests/mytest.rs [..] --test [..]` [FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [..] [RUNNING] `[CWD]/target/debug/deps/foo-[..] test_in_` [RUNNING] `[CWD]/target/debug/deps/mytest-[..] test_in_` @@ -3458,8 +3458,8 @@ fn test_many_targets() { .with_stdout_contains("test bin_b ... ok") .with_stdout_contains("test test_a ... ok") .with_stdout_contains("test test_b ... ok") - .with_stderr_contains("[RUNNING] `rustc --crate-name a examples/a.rs [..]`") - .with_stderr_contains("[RUNNING] `rustc --crate-name b examples/b.rs [..]`") + .with_stderr_contains("[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]`") + .with_stderr_contains("[RUNNING] `rustc --crate-name b --edition=2015 examples/b.rs [..]`") .run(); } @@ -4973,7 +4973,7 @@ fn cargo_test_print_env_verbose() { [FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [..] [RUNNING] `[..]CARGO_MANIFEST_DIR=[CWD][..] [CWD]/target/debug/deps/foo-[..][EXE]` [DOCTEST] foo -[RUNNING] `[..]CARGO_MANIFEST_DIR=[CWD][..] rustdoc --crate-type lib --crate-name foo[..]", +[RUNNING] `[..]CARGO_MANIFEST_DIR=[CWD][..] rustdoc --edition=2015 --crate-type lib --crate-name foo[..]", ) .run(); }