@@ -967,7 +967,7 @@ fn build_rustflags_for_build_scripts() {
967
967
. file (
968
968
"build.rs" ,
969
969
r#"
970
- fn main() { assert!(cfg!(foo)); }
970
+ fn main() { assert!(cfg!(foo), "CFG FOO!" ); }
971
971
"# ,
972
972
)
973
973
. file (
@@ -986,12 +986,7 @@ fn build_rustflags_for_build_scripts() {
986
986
p. cargo ( "check --target" )
987
987
. arg ( host)
988
988
. with_status ( 101 )
989
- . with_stderr_data ( str![ [ r#"
990
- ...
991
- assertion failed: cfg!(foo)
992
- [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
993
-
994
- "# ] ] )
989
+ . with_stderr_data ( "...\n [..]CFG FOO![..]\n ..." )
995
990
. run ( ) ;
996
991
997
992
// Enabling -Ztarget-applies-to-host should not make a difference without the config setting
@@ -1004,12 +999,7 @@ fn build_rustflags_for_build_scripts() {
1004
999
. masquerade_as_nightly_cargo ( & [ "target-applies-to-host" ] )
1005
1000
. arg ( "-Ztarget-applies-to-host" )
1006
1001
. with_status ( 101 )
1007
- . with_stderr_data ( str![ [ r#"
1008
- ...
1009
- assertion failed: cfg!(foo)
1010
- [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1011
-
1012
- "# ] ] )
1002
+ . with_stderr_data ( "...\n [..]CFG FOO![..]\n ..." )
1013
1003
. run ( ) ;
1014
1004
1015
1005
// When set to false though, the "proper" behavior where host artifacts _only_ pick up on
@@ -1027,24 +1017,14 @@ fn build_rustflags_for_build_scripts() {
1027
1017
. masquerade_as_nightly_cargo ( & [ "target-applies-to-host" ] )
1028
1018
. arg ( "-Ztarget-applies-to-host" )
1029
1019
. with_status ( 101 )
1030
- . with_stderr_data ( str![ [ r#"
1031
- ...
1032
- assertion failed: cfg!(foo)
1033
- [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1034
-
1035
- "# ] ] )
1020
+ . with_stderr_data ( "...\n [..]CFG FOO![..]\n ..." )
1036
1021
. run ( ) ;
1037
1022
p. cargo ( "check --target" )
1038
1023
. arg ( host)
1039
1024
. masquerade_as_nightly_cargo ( & [ "target-applies-to-host" ] )
1040
1025
. arg ( "-Ztarget-applies-to-host" )
1041
1026
. with_status ( 101 )
1042
- . with_stderr_data ( str![ [ r#"
1043
- ...
1044
- assertion failed: cfg!(foo)
1045
- [NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace
1046
-
1047
- "# ] ] )
1027
+ . with_stderr_data ( "...\n [..]CFG FOO![..]\n ..." )
1048
1028
. run ( ) ;
1049
1029
}
1050
1030
0 commit comments