@@ -611,31 +611,32 @@ fn build_script_needed_for_host_and_target() {
611
611
pub fn d2() { d1::d1(); }
612
612
" ) ;
613
613
614
- assert_that ( p. cargo_process ( "build" ) . arg ( "--target" ) . arg ( & target) . arg ( "-v" ) ,
614
+ assert_that ( p. cargo_process ( "build" ) . arg ( "--target" ) . arg ( & target) . arg ( "-v" )
615
+ . env ( "RUSTFLAGS" , "--cap-lints=forbid" ) . env ( "RUSTFLAGS_HOST" , "--cap-lints=warn" ) ,
615
616
execs ( ) . with_status ( 0 )
616
617
. with_stderr_contains ( & format ! ( "\
617
618
[COMPILING] d1 v0.0.0 ({url}/d1)", url = p. url( ) ) )
618
619
. with_stderr_contains ( & format ! ( "\
619
- [RUNNING] `rustc [..] d1[/]build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]d1-[..]`" ,
620
- dir = p. root( ) . display( ) ) )
620
+ [RUNNING] `rustc [..] d1[/]build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]d1-[..] \
621
+ --cap-lints=warn`" , dir = p. root( ) . display( ) ) )
621
622
. with_stderr_contains ( & format ! ( "\
622
623
[RUNNING] `{dir}[/]target[/]debug[/]build[/]d1-[..][/]build-script-build`",
623
- dir = p. root( ) . display( ) ) )
624
+ dir = p. root( ) . display( ) ) )
624
625
. with_stderr_contains ( "\
625
- [RUNNING] `rustc [..] d1[/]src[/]lib.rs [..]`")
626
+ [RUNNING] `rustc [..] d1[/]src[/]lib.rs [..] --cap-lints=warn [..] `")
626
627
. with_stderr_contains ( & format ! ( "\
627
628
[COMPILING] d2 v0.0.0 ({url}/d2)", url = p. url( ) ) )
628
629
. with_stderr_contains ( & format ! ( "\
629
- [RUNNING] `rustc [..] d2[/]src[/]lib.rs [..] \
630
+ [RUNNING] `rustc [..] d2[/]src[/]lib.rs [..] --cap-lints=warn \
630
631
-L /path/to/{host}`", host = host) )
631
632
. with_stderr_contains ( & format ! ( "\
632
633
[COMPILING] foo v0.0.0 ({url})", url = p. url( ) ) )
633
634
. with_stderr_contains ( & format ! ( "\
634
635
[RUNNING] `rustc [..] build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]foo-[..] \
635
- -L /path/to/{host}`", dir = p. root( ) . display( ) , host = host) )
636
+ --cap-lints=warn - L /path/to/{host}`", dir = p. root( ) . display( ) , host = host) )
636
637
. with_stderr_contains ( & format ! ( "\
637
638
[RUNNING] `rustc [..] src[/]main.rs [..] --target {target} [..] \
638
- -L /path/to/{target}`", target = target) ) ) ;
639
+ --cap-lints=forbid - L /path/to/{target}`", target = target) ) ) ;
639
640
}
640
641
641
642
#[ test]
0 commit comments