@@ -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 ) ;
@@ -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
@@ -2210,8 +2210,8 @@ fn env_vars_and_build_products_for_various_build_targets() {
22102210[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
22112211[COMPILING] foo v0.0.0 ([ROOT]/foo)
22122212[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
2213- [RUNNING] unittests src/lib.rs (target/debug/deps /foo-[HASH][EXE])
2214- [RUNNING] tests/main.rs (target/debug/deps /main-[HASH][EXE])
2213+ [RUNNING] unittests src/lib.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
2214+ [RUNNING] tests/main.rs (target/debug/build/foo/[HASH]/out /main-[HASH][EXE])
22152215[DOCTEST] foo
22162216
22172217"# ] ] )
@@ -2419,7 +2419,11 @@ fn doc_lib_true() {
24192419
24202420 // Verify that it emits rmeta for the bin and lib dependency.
24212421 assert_eq ! ( p. glob( "target/debug/artifact/*.rlib" ) . count( ) , 0 ) ;
2422- assert_eq ! ( p. glob( "target/debug/deps/libbar-*.rmeta" ) . count( ) , 2 ) ;
2422+ assert_eq ! (
2423+ p. glob( "target/debug/build/bar/*/out/libbar-*.rmeta" )
2424+ . count( ) ,
2425+ 2
2426+ ) ;
24232427
24242428 p. cargo ( "doc -Z bindeps" )
24252429 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -2511,7 +2515,7 @@ fn assert_artifact_executable_output(
25112515 if cfg ! ( target_env = "msvc" ) {
25122516 assert_eq ! (
25132517 p. glob( format!(
2514- "target/{}/deps/artifact/{}-* /bin/{}{}" ,
2518+ "target/{}/build/{}/*/artifact /bin/{}{}" ,
25152519 target_name,
25162520 dep_name,
25172521 bin_name,
@@ -2524,7 +2528,7 @@ fn assert_artifact_executable_output(
25242528 } else {
25252529 assert_eq ! (
25262530 p. glob( format!(
2527- "target/{}/deps/artifact/{}-*/ bin/{}-* {}" ,
2531+ "target/{}/build/{}/*/artifact/ bin/{}{}" ,
25282532 target_name,
25292533 dep_name,
25302534 bin_name,
@@ -2541,7 +2545,7 @@ fn assert_artifact_executable_output(
25412545
25422546fn build_script_output_string ( p : & Project , package_name : & str ) -> String {
25432547 let paths = p
2544- . glob ( format ! ( "target/debug/build/{}-*/output " , package_name) )
2548+ . glob ( format ! ( "target/debug/build/{}/*/run/stdout " , package_name) )
25452549 . collect :: < Result < Vec < _ > , _ > > ( )
25462550 . unwrap ( ) ;
25472551 assert_eq ! ( paths. len( ) , 1 ) ;
@@ -2825,7 +2829,7 @@ fn with_assumed_host_target_and_optional_build_dep() {
28252829[COMPILING] d1 v0.0.1 ([ROOT]/foo/d1)
28262830[RUNNING] `rustc --crate-name build_script_build --edition=2021 [..]--crate-type bin[..]
28272831[RUNNING] `rustc --crate-name d1 --edition=2021 [..]--crate-type bin[..]
2828- [RUNNING] `[ROOT]/foo/target/debug/build/foo- [HASH]/build-script-build `
2832+ [RUNNING] `[ROOT]/foo/target/debug/build/foo/ [HASH]/out/build_script_build `
28292833[RUNNING] `rustc --crate-name foo --edition=2021 [..]--cfg[..]d1[..]
28302834[FINISHED] `dev` profile [..]
28312835[COMPILING] foo v0.0.1 ([ROOT]/foo)
@@ -3492,7 +3496,7 @@ fn artifact_dep_target_does_not_propagate_to_deps_of_build_script() {
34923496[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
34933497[COMPILING] foo v0.0.1 ([ROOT]/foo)
34943498[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3495- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3499+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
34963500
34973501"# ] ] )
34983502 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -3584,7 +3588,7 @@ fn artifact_dep_target_does_not_propagate_to_proc_macro() {
35843588[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
35853589[COMPILING] foo v0.0.1 ([ROOT]/foo)
35863590[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3587- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3591+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
35883592
35893593"# ] ] )
35903594 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
0 commit comments