@@ -620,25 +620,25 @@ fn build_script_with_bin_artifacts() {
620620 assert_e2e ( ) . eq (
621621 & build_script_output,
622622 str![ [ r#"
623- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/baz[EXE]
624- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/staticlib/bar-[HASH].lib
625- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/cdylib/bar.dll
626- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin
627- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar[EXE]
628- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar[EXE]
623+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/baz[EXE]
624+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /staticlib/bar-[HASH].lib
625+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /cdylib/bar.dll
626+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin
627+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/bar[EXE]
628+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/bar[EXE]
629629
630630"# ] ] ,
631631 ) ;
632632 } else {
633633 assert_e2e ( ) . eq (
634634 & build_script_output,
635635 str![ [ r#"
636- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/baz-[HASH] [EXE]
637- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/staticlib/libbar-[HASH].a
638- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/cdylib/[..]bar.[..]
639- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin
640- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar-[HASH] [EXE]
641- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar-[HASH] [EXE]
636+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/baz[EXE]
637+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /staticlib/libbar-[HASH].a
638+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /cdylib/[..]bar.[..]
639+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin
640+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/bar[EXE]
641+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/bar[EXE]
642642
643643"# ] ] ,
644644 ) ;
@@ -810,17 +810,17 @@ fn build_script_with_selected_dashed_bin_artifact_and_lib_true() {
810810 assert_e2e ( ) . eq (
811811 & build_script_output,
812812 str![ [ r#"
813- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin
814- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin/baz_suffix[EXE]
813+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin
814+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin/baz_suffix[EXE]
815815
816816"# ] ] ,
817817 ) ;
818818 } else {
819819 assert_e2e ( ) . eq (
820820 & build_script_output,
821821 str![ [ r#"
822- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin
823- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin/baz_suffix-[HASH] [EXE]
822+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin
823+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact/ bin/baz_suffix[EXE]
824824
825825"# ] ] ,
826826 ) ;
@@ -830,7 +830,7 @@ fn build_script_with_selected_dashed_bin_artifact_and_lib_true() {
830830 !p. bin( "bar" ) . is_file( ) ,
831831 "artifacts are located in their own directory, exclusively, and won't be lifted up"
832832 ) ;
833- assert_artifact_executable_output ( & p, "debug" , "bar" , "baz_suffix" ) ;
833+ assert_artifact_executable_output ( & p, "debug" , "bar-baz " , "baz_suffix" ) ;
834834}
835835
836836#[ cargo_test]
@@ -904,7 +904,7 @@ fn lib_with_selected_dashed_bin_artifact_and_lib_true() {
904904 !p. bin( "bar" ) . is_file( ) ,
905905 "artifacts are located in their own directory, exclusively, and won't be lifted up"
906906 ) ;
907- assert_artifact_executable_output ( & p, "debug" , "bar" , "baz_suffix" ) ;
907+ assert_artifact_executable_output ( & p, "debug" , "bar-baz " , "baz_suffix" ) ;
908908}
909909
910910#[ cargo_test]
@@ -947,7 +947,7 @@ fn allow_artifact_and_no_artifact_dep_to_same_package_within_different_dep_categ
947947[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
948948[COMPILING] foo v0.0.0 ([ROOT]/foo)
949949[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
950- [RUNNING] unittests src/lib.rs (target/debug/deps /foo-[HASH][EXE])
950+ [RUNNING] unittests src/lib.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
951951[DOCTEST] foo
952952
953953"# ] ] )
@@ -1296,7 +1296,7 @@ fn cross_doctests_works_with_artifacts() {
12961296[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
12971297[COMPILING] foo v0.0.1 ([ROOT]/foo)
12981298[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1299- [RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/deps /foo-[HASH][EXE])
1299+ [RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
13001300[DOCTEST] foo
13011301
13021302"# ] ] )
@@ -1320,7 +1320,7 @@ fn cross_doctests_works_with_artifacts() {
13201320[RUNNING] `rustc --crate-name foo [..]
13211321[RUNNING] `rustc --crate-name foo [..]
13221322[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1323- [RUNNING] `[ROOT]/foo/target/[ALT_TARGET]/debug/deps /foo-[HASH][EXE]`
1323+ [RUNNING] `[ROOT]/foo/target/[ALT_TARGET]/debug/build/foo/[HASH]/out /foo-[HASH][EXE]`
13241324[DOCTEST] foo
13251325[RUNNING] `rustdoc [..]--test src/lib.rs --test-run-directory [ROOT]/foo --target [ALT_TARGET] [..]
13261326
@@ -1426,7 +1426,7 @@ fn profile_override_basic() {
14261426[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=1 [..]`
14271427[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=3 [..]`
14281428[RUNNING] `rustc --crate-name foo [..] -C opt-level=3 [..]`
1429- [RUNNING] `[ROOT]/foo/target/debug/build/foo- [HASH]/build-script-build `
1429+ [RUNNING] `[ROOT]/foo/target/debug/build/foo/ [HASH]/out/build_script_build `
14301430[FINISHED] `dev` profile [optimized + debuginfo] target(s) in [ELAPSED]s
14311431[COMPILING] foo v0.0.1 ([ROOT]/foo)
14321432
@@ -2211,8 +2211,8 @@ fn env_vars_and_build_products_for_various_build_targets() {
22112211[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
22122212[COMPILING] foo v0.0.0 ([ROOT]/foo)
22132213[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
2214- [RUNNING] unittests src/lib.rs (target/debug/deps /foo-[HASH][EXE])
2215- [RUNNING] tests/main.rs (target/debug/deps /main-[HASH][EXE])
2214+ [RUNNING] unittests src/lib.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
2215+ [RUNNING] tests/main.rs (target/debug/build/foo/[HASH]/out /main-[HASH][EXE])
22162216[DOCTEST] foo
22172217
22182218"# ] ] )
@@ -2420,7 +2420,11 @@ fn doc_lib_true() {
24202420
24212421 // Verify that it emits rmeta for the bin and lib dependency.
24222422 assert_eq ! ( p. glob( "target/debug/artifact/*.rlib" ) . count( ) , 0 ) ;
2423- assert_eq ! ( p. glob( "target/debug/deps/libbar-*.rmeta" ) . count( ) , 2 ) ;
2423+ assert_eq ! (
2424+ p. glob( "target/debug/build/bar/*/out/libbar-*.rmeta" )
2425+ . count( ) ,
2426+ 2
2427+ ) ;
24242428
24252429 p. cargo ( "doc -Z bindeps" )
24262430 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -2512,7 +2516,7 @@ fn assert_artifact_executable_output(
25122516 if cfg ! ( target_env = "msvc" ) {
25132517 assert_eq ! (
25142518 p. glob( format!(
2515- "target/{}/deps/artifact/{}-* /bin/{}{}" ,
2519+ "target/{}/build/{}/*/artifact /bin/{}{}" ,
25162520 target_name,
25172521 dep_name,
25182522 bin_name,
@@ -2525,7 +2529,7 @@ fn assert_artifact_executable_output(
25252529 } else {
25262530 assert_eq ! (
25272531 p. glob( format!(
2528- "target/{}/deps/artifact/{}-*/ bin/{}-* {}" ,
2532+ "target/{}/build/{}/*/artifact/ bin/{}{}" ,
25292533 target_name,
25302534 dep_name,
25312535 bin_name,
@@ -2542,7 +2546,7 @@ fn assert_artifact_executable_output(
25422546
25432547fn build_script_output_string ( p : & Project , package_name : & str ) -> String {
25442548 let paths = p
2545- . glob ( format ! ( "target/debug/build/{}-*/output " , package_name) )
2549+ . glob ( format ! ( "target/debug/build/{}/*/run/stdout " , package_name) )
25462550 . collect :: < Result < Vec < _ > , _ > > ( )
25472551 . unwrap ( ) ;
25482552 assert_eq ! ( paths. len( ) , 1 ) ;
@@ -2826,7 +2830,7 @@ fn with_assumed_host_target_and_optional_build_dep() {
28262830[COMPILING] d1 v0.0.1 ([ROOT]/foo/d1)
28272831[RUNNING] `rustc --crate-name build_script_build --edition=2021 [..]--crate-type bin[..]
28282832[RUNNING] `rustc --crate-name d1 --edition=2021 [..]--crate-type bin[..]
2829- [RUNNING] `[ROOT]/foo/target/debug/build/foo- [HASH]/build-script-build `
2833+ [RUNNING] `[ROOT]/foo/target/debug/build/foo/ [HASH]/out/build_script_build `
28302834[RUNNING] `rustc --crate-name foo --edition=2021 [..]--cfg[..]d1[..]
28312835[FINISHED] `dev` profile [..]
28322836[COMPILING] foo v0.0.1 ([ROOT]/foo)
@@ -3493,7 +3497,7 @@ fn artifact_dep_target_does_not_propagate_to_deps_of_build_script() {
34933497[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
34943498[COMPILING] foo v0.0.1 ([ROOT]/foo)
34953499[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3496- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3500+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
34973501
34983502"# ] ] )
34993503 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -3585,7 +3589,7 @@ fn artifact_dep_target_does_not_propagate_to_proc_macro() {
35853589[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
35863590[COMPILING] foo v0.0.1 ([ROOT]/foo)
35873591[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3588- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3592+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
35893593
35903594"# ] ] )
35913595 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
0 commit comments