Skip to content

Commit 797e8a9

Browse files
authored
[beta 1.98] revert(compiler): forward verbose flag to rustc for local crates (#17316)
Beta backports - #17314 - #17315 In order to make CI pass, the following PRs are also cherry-picked: -
2 parents d33be5d + 4d29d6c commit 797e8a9

11 files changed

Lines changed: 52 additions & 97 deletions

File tree

‎src/cargo/core/compiler/mod.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,9 +815,6 @@ fn prepare_rustc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResult
815815
if build_runner.bcx.gctx.cli_unstable().checksum_freshness {
816816
base.arg("-Z").arg("checksum-hash-algorithm=blake3");
817817
}
818-
if gctx.shell().verbosity() == Verbosity::Verbose && unit.is_local() {
819-
base.arg("--verbose");
820-
}
821818

822819
if is_primary {
823820
base.env("CARGO_PRIMARY_PACKAGE", "1");

‎src/doc/src/CHANGELOG.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
### Changed
99

10-
- Forward verbose flag to rustc for local crates
11-
[#17006](https://github.com/rust-lang/cargo/pull/17006)
12-
1310
### Fixed
1411

1512
### Nightly only

‎tests/testsuite/build.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,7 +1572,7 @@ fn cargo_default_env_metadata_env_var() {
15721572
.with_stderr_data(format!(
15731573
"\
15741574
...
1575-
[RUNNING] `rustc --crate-name foo [..]--extern bar=[ROOT]/foo/target/debug/deps/{dll_prefix}bar{dll_suffix}[..]`
1575+
[RUNNING] `rustc --crate-name foo [..]--extern bar=[ROOT]/foo/target/debug/deps/{dll_prefix}bar{dll_suffix}`
15761576
...
15771577
"))
15781578
.run();
@@ -1585,7 +1585,7 @@ fn cargo_default_env_metadata_env_var() {
15851585
.with_stderr_data(format!(
15861586
"\
15871587
...
1588-
[RUNNING] `rustc --crate-name foo [..]--extern bar=[ROOT]/foo/target/debug/deps/{dll_prefix}bar-[..]{dll_suffix}[..]`
1588+
[RUNNING] `rustc --crate-name foo [..]--extern bar=[ROOT]/foo/target/debug/deps/{dll_prefix}bar-[..]{dll_suffix}`
15891589
...
15901590
"))
15911591
.run();
@@ -5891,7 +5891,7 @@ fn build_lib_only() {
58915891
p.cargo("build --lib -v")
58925892
.with_stderr_data(str![[r#"
58935893
[COMPILING] foo v0.0.1 ([ROOT]/foo)
5894-
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..] -L dependency=[ROOT]/foo/target/debug/deps[..]`
5894+
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..] -L dependency=[ROOT]/foo/target/debug/deps`
58955895
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
58965896
58975897
"#]])
@@ -6562,7 +6562,7 @@ fn should_not_include_current_build_unit_path_in_rustc_args() {
65626562
// Don't pass any `-L` args if there are no dependencies (including our own `out` dir)
65636563
.with_stderr_data(str![[r#"
65646564
[COMPILING] foo v0.0.1 ([ROOT]/foo)
6565-
[RUNNING] `rustc --crate-name foo [..] --out-dir [ROOT]/foo/build-dir/debug/build/foo/[HASH]/out --verbose`
6565+
[RUNNING] `rustc --crate-name foo [..] --out-dir [ROOT]/foo/build-dir/debug/build/foo/[HASH]/out`
65666566
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
65676567
65686568
"#]])
@@ -6593,7 +6593,7 @@ fn should_not_include_build_script_out_dir_path_in_rustc_args() {
65936593
[COMPILING] foo v0.0.1 ([ROOT]/foo)
65946594
[RUNNING] `rustc --crate-name build_script_build [..]`
65956595
[RUNNING] `[ROOT]/foo/build-dir/debug/build/foo/[HASH]/out/build_script_build`
6596-
[RUNNING] `rustc --crate-name foo [..] --out-dir [ROOT]/foo/build-dir/debug/build/foo/[HASH]/out --verbose`
6596+
[RUNNING] `rustc --crate-name foo [..] --out-dir [ROOT]/foo/build-dir/debug/build/foo/[HASH]/out`
65976597
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
65986598
65996599
"#]])

‎tests/testsuite/build_script.rs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,9 +1326,9 @@ fn custom_build_script_rustc_flags() {
13261326
[COMPILING] foo v0.5.0 ([ROOT]/foo/foo)
13271327
[RUNNING] `rustc --crate-name build_script_build --edition=2015 foo/build.rs [..]`
13281328
[RUNNING] `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
1329-
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --verbose -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2 -l nonexistinglib`
1329+
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]-L dependency=[ROOT]/foo/target/debug/deps -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2 -l nonexistinglib`
13301330
[COMPILING] bar v0.5.0 ([ROOT]/foo)
1331-
[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib --verbose -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2`
1331+
[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2`
13321332
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
13331333
13341334
"#]]).run();
@@ -1385,9 +1385,9 @@ fn custom_build_script_rustc_flags_no_space() {
13851385
[COMPILING] foo v0.5.0 ([ROOT]/foo/foo)
13861386
[RUNNING] `rustc --crate-name build_script_build --edition=2015 foo/build.rs [..]`
13871387
[RUNNING] `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
1388-
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --verbose -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2 -l nonexistinglib`
1388+
[RUNNING] `rustc --crate-name foo --edition=2015 foo/src/lib.rs [..]-L dependency=[ROOT]/foo/target/debug/deps -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2 -l nonexistinglib`
13891389
[COMPILING] bar v0.5.0 ([ROOT]/foo)
1390-
[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib --verbose -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2`
1390+
[RUNNING] `rustc --crate-name bar --edition=2015 src/main.rs [..]-L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib -L [ROOT]/foo/dummy-path1 -L [ROOT]/foo/dummy-path2`
13911391
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
13921392
13931393
"#]]).run();
@@ -2578,7 +2578,7 @@ fn build_deps_simple() {
25782578
[COMPILING] a v0.5.0 ([ROOT]/foo/a)
25792579
[RUNNING] `rustc --crate-name a [..]`
25802580
[COMPILING] foo v0.5.0 ([ROOT]/foo)
2581-
[RUNNING] `rustc --crate-name build_script_build [..] build.rs [..] --extern a=[ROOT]/foo/target/debug/deps/liba-[HASH].rlib[..]`
2581+
[RUNNING] `rustc --crate-name build_script_build [..] build.rs [..] --extern a=[ROOT]/foo/target/debug/deps/liba-[HASH].rlib`
25822582
[RUNNING] `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
25832583
[RUNNING] `rustc --crate-name foo [..]`
25842584
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -2691,13 +2691,13 @@ fn build_cmd_with_a_build_cmd() {
26912691
[COMPILING] b v0.5.0 ([ROOT]/foo/b)
26922692
[RUNNING] `rustc --crate-name b [..]`
26932693
[COMPILING] a v0.5.0 ([ROOT]/foo/a)
2694-
[RUNNING] `rustc --crate-name build_script_build [..] a/build.rs [..] --extern b=[ROOT]/foo/target/debug/deps/libb-[HASH].rlib[..]`
2694+
[RUNNING] `rustc --crate-name build_script_build [..] a/build.rs [..] --extern b=[ROOT]/foo/target/debug/deps/libb-[HASH].rlib`
26952695
[RUNNING] `[ROOT]/foo/target/debug/build/a-[HASH]/build-script-build`
2696-
[RUNNING] `rustc --crate-name a [..]a/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
2696+
[RUNNING] `rustc --crate-name a [..]a/src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
26972697
[COMPILING] foo v0.5.0 ([ROOT]/foo)
2698-
[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/build/foo-[HASH] -L dependency=[ROOT]/foo/target/debug/deps --extern a=[ROOT]/foo/target/debug/deps/liba-[HASH].rlib[..]`
2698+
[RUNNING] `rustc --crate-name build_script_build --edition=2015 build.rs [..]--crate-type bin --emit=[..]link[..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/build/foo-[HASH] -L dependency=[ROOT]/foo/target/debug/deps --extern a=[ROOT]/foo/target/debug/deps/liba-[HASH].rlib`
26992699
[RUNNING] `[ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
2700-
[RUNNING] `rustc --crate-name foo [..]src/lib.rs [..]--crate-type lib --emit=[..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
2700+
[RUNNING] `rustc --crate-name foo [..]src/lib.rs [..]--crate-type lib --emit=[..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
27012701
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
27022702
27032703
"#]]).run();

‎tests/testsuite/cross_compile.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ fn linker() {
494494
please set bin.path in Cargo.toml
495495
[WARNING] `foo` (manifest) generated 1 warning
496496
[COMPILING] foo v0.5.0 ([ROOT]/foo)
497-
[RUNNING] `rustc --crate-name foo --edition=2015 src/foo.rs [..]--crate-type bin --emit=[..]link[..]-C debuginfo=2 [..] -C metadata=[..] --out-dir [ROOT]/foo/target/[ALT_TARGET]/debug/deps --target [ALT_TARGET] -C linker=my-linker-tool -L dependency=[ROOT]/foo/target/[ALT_TARGET]/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
497+
[RUNNING] `rustc --crate-name foo --edition=2015 src/foo.rs [..]--crate-type bin --emit=[..]link[..]-C debuginfo=2 [..] -C metadata=[..] --out-dir [ROOT]/foo/target/[ALT_TARGET]/debug/deps --target [ALT_TARGET] -C linker=my-linker-tool -L dependency=[ROOT]/foo/target/[ALT_TARGET]/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
498498
[ERROR] linker `my-linker-tool` not found
499499
...
500500
"#]])

‎tests/testsuite/pgo.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn pgo_works() {
104104
)
105105
.with_stderr_data(str![[r#"
106106
[COMPILING] foo v0.0.0 ([ROOT]/foo)
107-
[RUNNING] `rustc [..]-Cprofile-use=[ROOT]/foo/target/merged.profdata -Cllvm-args=-pgo-warn-missing-function[..]`
107+
[RUNNING] `rustc [..]-Cprofile-use=[ROOT]/foo/target/merged.profdata -Cllvm-args=-pgo-warn-missing-function`
108108
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
109109
110110
"#]])

‎tests/testsuite/profiles.rs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn profile_overrides() {
2929
.build();
3030
p.cargo("build -v").with_stderr_data(str![[r#"
3131
[COMPILING] test v0.0.0 ([ROOT]/foo)
32-
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..] -C opt-level=1[..] -C debug-assertions=on[..] -C metadata=[..] -C rpath --out-dir [ROOT]/foo/target/debug/deps [..] -L dependency=[ROOT]/foo/target/debug/deps[..]`
32+
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..] -C opt-level=1[..] -C debug-assertions=on[..] -C metadata=[..] -C rpath --out-dir [ROOT]/foo/target/debug/deps [..] -L dependency=[ROOT]/foo/target/debug/deps`
3333
[FINISHED] `dev` profile [optimized] target(s) in [ELAPSED]s
3434
3535
"#]]).run();
@@ -56,7 +56,7 @@ fn opt_level_override_0() {
5656
.build();
5757
p.cargo("build -v").with_stderr_data(str![[r#"
5858
[COMPILING] test v0.0.0 ([ROOT]/foo)
59-
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..] -C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
59+
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..] -C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
6060
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6161
6262
"#]]).run();
@@ -82,7 +82,7 @@ fn debug_override_1() {
8282
.build();
8383
p.cargo("build -v").with_stderr_data(str![[r#"
8484
[COMPILING] test v0.0.0 ([ROOT]/foo)
85-
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=1 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
85+
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=1 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
8686
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
8787
8888
"#]]).run();
@@ -120,7 +120,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) {
120120
-C debug-assertions=on[..] \
121121
-C metadata=[..] \
122122
--out-dir [..] \
123-
-L dependency=[ROOT]/foo/target/debug/deps[..]`
123+
-L dependency=[ROOT]/foo/target/debug/deps`
124124
[FINISHED] `dev` profile [..]+ debuginfo] target(s) in [ELAPSED]s
125125
",
126126
level = rustc_level
@@ -197,7 +197,7 @@ fn top_level_overrides_deps() {
197197
-C debuginfo=2 [..]\
198198
-C metadata=[..] \
199199
--out-dir [ROOT]/foo/target/release/deps \
200-
-L dependency=[ROOT]/foo/target/release/deps[..]`
200+
-L dependency=[ROOT]/foo/target/release/deps`
201201
[COMPILING] test v0.0.0 ([ROOT]/foo)
202202
[RUNNING] `rustc --crate-name test --edition=2015 src/lib.rs [..]--crate-type lib \
203203
--emit=[..]link \
@@ -208,7 +208,7 @@ fn top_level_overrides_deps() {
208208
-L dependency=[ROOT]/foo/target/release/deps \
209209
--extern foo=[ROOT]/foo/target/release/deps/\
210210
{prefix}foo[..]{suffix} \
211-
--extern foo=[ROOT]/foo/target/release/deps/libfoo.rlib[..]`
211+
--extern foo=[ROOT]/foo/target/release/deps/libfoo.rlib`
212212
[FINISHED] `release` profile [optimized + debuginfo] target(s) in [ELAPSED]s
213213
",
214214
prefix = env::consts::DLL_PREFIX,

‎tests/testsuite/run.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,9 @@ fn example_with_release_flag() {
11051105
.with_stderr_data(str![[r#"
11061106
[LOCKING] 1 package to latest compatible version
11071107
[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
1108-
[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..] -C metadata=[..] --out-dir [ROOT]/foo/target/release/deps -C strip=debuginfo -L dependency=[ROOT]/foo/target/release/deps[..]`
1108+
[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib --emit=[..]link -C opt-level=3[..] -C metadata=[..] --out-dir [ROOT]/foo/target/release/deps -C strip=debuginfo -L dependency=[ROOT]/foo/target/release/deps`
11091109
[COMPILING] foo v0.0.1 ([ROOT]/foo)
1110-
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin --emit=[..]link -C opt-level=3[..] -C metadata=[..] --out-dir [ROOT]/foo/target/release/examples -C strip=debuginfo -L dependency=[ROOT]/foo/target/release/deps --extern bar=[ROOT]/foo/target/release/deps/libbar-[HASH].rlib[..]`
1110+
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin --emit=[..]link -C opt-level=3[..] -C metadata=[..] --out-dir [ROOT]/foo/target/release/examples -C strip=debuginfo -L dependency=[ROOT]/foo/target/release/deps --extern bar=[ROOT]/foo/target/release/deps/libbar-[HASH].rlib`
11111111
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
11121112
[RUNNING] `target/release/examples/a[EXE]`
11131113
@@ -1122,9 +1122,9 @@ fast2
11221122
p.cargo("run -v --example a")
11231123
.with_stderr_data(str![[r#"
11241124
[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
1125-
[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib --emit=[..]link [..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
1125+
[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/bar.rs [..]--crate-type lib --emit=[..]link [..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
11261126
[COMPILING] foo v0.0.1 ([ROOT]/foo)
1127-
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin --emit=[..]link [..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/examples -L dependency=[ROOT]/foo/target/debug/deps --extern bar=[ROOT]/foo/target/debug/deps/libbar-[HASH].rlib[..]`
1127+
[RUNNING] `rustc --crate-name a --edition=2015 examples/a.rs [..]--crate-type bin --emit=[..]link [..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/examples -L dependency=[ROOT]/foo/target/debug/deps --extern bar=[ROOT]/foo/target/debug/deps/libbar-[HASH].rlib`
11281128
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
11291129
[RUNNING] `target/debug/examples/a[EXE]`
11301130

‎tests/testsuite/rustc.rs‎

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn build_lib_for_foo() {
1717

1818
p.cargo("rustc --lib -v").with_stderr_data(str![[r#"
1919
[COMPILING] foo v0.0.1 ([ROOT]/foo)
20-
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..]-C metadata=[..] [..]--out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
20+
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..]-C metadata=[..] [..]--out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
2121
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
2222
2323
"#]]).run();
@@ -50,7 +50,7 @@ fn build_main_and_allow_unstable_options() {
5050
p.cargo("rustc -v --bin foo -- -C debug-assertions")
5151
.with_stderr_data(str![[r#"
5252
[COMPILING] foo v0.0.1 ([ROOT]/foo)
53-
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps[..]`
53+
[RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs [..]--crate-type lib --emit=[..]link[..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps`
5454
[RUNNING] `rustc --crate-name foo --edition=2015 src/main.rs [..]--crate-type bin --emit=[..]link[..]-C debuginfo=2 [..]-C metadata=[..] --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib[..]-C debug-assertions[..]`
5555
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
5656
@@ -870,7 +870,7 @@ fn precedence() {
870870
.env("RUSTFLAGS", "--cfg from_rustflags")
871871
.with_stderr_data(str![[r#"
872872
[COMPILING] foo v0.0.0 ([ROOT]/foo)
873-
[RUNNING] `rustc [..]-C strip=debuginfo [..]--cfg cargo_rustc -C strip=symbols --cfg from_rustflags[..]`
873+
[RUNNING] `rustc [..]-C strip=debuginfo [..]--cfg cargo_rustc -C strip=symbols --cfg from_rustflags`
874874
[FINISHED] `release` profile [optimized] target(s) in [ELAPSED]s
875875
876876
"#]])
@@ -898,42 +898,3 @@ fn build_with_duplicate_crate_types() {
898898
"#]])
899899
.run();
900900
}
901-
902-
#[cargo_test]
903-
fn verbose_flag_forwarded_to_rustc_for_local_only() {
904-
cargo_test_support::registry::Package::new("bar", "1.0.0")
905-
.file("src/lib.rs", "pub fn bar() {}")
906-
.publish();
907-
908-
let p = project()
909-
.file(
910-
"Cargo.toml",
911-
r#"
912-
[package]
913-
name = "foo"
914-
version = "0.1.0"
915-
edition = "2015"
916-
917-
[dependencies]
918-
bar = "1.0"
919-
"#,
920-
)
921-
.file("src/lib.rs", "extern crate bar; pub fn main() {}")
922-
.build();
923-
924-
p.cargo("build -v")
925-
.with_stderr_data(str![[r#"
926-
[UPDATING] `dummy-registry` index
927-
[LOCKING] 1 package to latest compatible version
928-
[DOWNLOADING] crates ...
929-
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
930-
[COMPILING] bar v1.0.0
931-
[RUNNING] `rustc --crate-name bar [..]`
932-
[COMPILING] foo v0.1.0 ([ROOT]/foo)
933-
[RUNNING] `rustc --crate-name foo [..] --verbose`
934-
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
935-
936-
"#]])
937-
.with_stderr_does_not_contain("[RUNNING] `rustc --crate-name bar [..] --verbose`")
938-
.run();
939-
}

‎tests/testsuite/rustdocflags.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ fn not_affected_by_target_rustflags() {
178178
.with_status(101)
179179
.with_stderr_data(str![[r#"
180180
...
181-
[RUNNING] `rustc [..] -D missing-docs[..]`
181+
[RUNNING] `rustc [..] -D missing-docs`
182182
...
183183
"#]])
184184
.run();

0 commit comments

Comments
 (0)