@@ -4147,43 +4147,40 @@ fn build_filter_infer_profile() {
41474147
41484148 p. cargo ( "build -v" )
41494149 . with_stderr_contains (
4150- "\
4151- [RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
4150+ "[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
41524151 --emit=dep-info,link[..]",
41534152 ) . with_stderr_contains (
4154- "\
4155- [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
4153+ "[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
41564154 --emit=dep-info,link[..]",
41574155 ) . run ( ) ;
41584156
41594157 p. root ( ) . join ( "target" ) . rm_rf ( ) ;
41604158 p. cargo ( "build -v --test=t1" )
41614159 . with_stderr_contains (
4162- "\
4163- [RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
4164- --emit=dep-info,link[..]",
4160+ "[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
4161+ --emit=dep-info,link -C debuginfo=2 [..]",
41654162 ) . with_stderr_contains (
4166- "[RUNNING] `rustc --crate-name t1 tests/t1.rs --color never --emit=dep-info,link[..]" ,
4163+ "[RUNNING] `rustc --crate-name t1 tests/t1.rs --color never --emit=dep-info,link \
4164+ -C debuginfo=2 [..]",
41674165 ) . with_stderr_contains (
4168- "\
4169- [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
4170- --emit=dep-info,link[..]",
4166+ "[RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
4167+ --emit=dep-info,link -C debuginfo=2 [..]",
41714168 ) . run ( ) ;
41724169
41734170 p. root ( ) . join ( "target" ) . rm_rf ( ) ;
4171+ // Bench uses test profile without `--release`.
41744172 p. cargo ( "build -v --bench=b1" )
41754173 . with_stderr_contains (
4176- "\
4177- [RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
4178- --emit=dep-info,link[..]",
4174+ "[RUNNING] `rustc --crate-name foo src/lib.rs --color never --crate-type lib \
4175+ --emit=dep-info,link -C debuginfo=2 [..]",
41794176 ) . with_stderr_contains (
4180- "\
4181- [RUNNING] `rustc --crate-name b1 benches/b1.rs --color never --emit=dep-info,link \
4182- -C opt-level=3[..]" ,
4183- ) . with_stderr_contains (
4184- " \
4185- [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
4186- --emit=dep-info,link[..]",
4177+ "[RUNNING] `rustc --crate-name b1 benches/b1.rs --color never --emit=dep-info,link \
4178+ -C debuginfo=2 [..]" ,
4179+ )
4180+ . with_stderr_does_not_contain ( "opt-level" )
4181+ . with_stderr_contains (
4182+ " [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
4183+ --emit=dep-info,link -C debuginfo=2 [..]",
41874184 ) . run ( ) ;
41884185}
41894186
@@ -4213,10 +4210,6 @@ fn targets_selected_all() {
42134210 . with_stderr_contains ( "\
42144211 [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
42154212 --emit=dep-info,link[..]")
4216- // bench
4217- . with_stderr_contains ( "\
4218- [RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
4219- -C opt-level=3 --test [..]")
42204213 // unit test
42214214 . with_stderr_contains ( "\
42224215 [RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
@@ -4231,10 +4224,6 @@ fn all_targets_no_lib() {
42314224 . with_stderr_contains ( "\
42324225 [RUNNING] `rustc --crate-name foo src/main.rs --color never --crate-type bin \
42334226 --emit=dep-info,link[..]")
4234- // bench
4235- . with_stderr_contains ( "\
4236- [RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
4237- -C opt-level=3 --test [..]")
42384227 // unit test
42394228 . with_stderr_contains ( "\
42404229 [RUNNING] `rustc --crate-name foo src/main.rs --color never --emit=dep-info,link \
0 commit comments