File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 44use std:: path:: Path ;
55
66use run_make_support:: rfs:: { create_dir, remove_dir_all} ;
7- use run_make_support:: { run, rustc, rustdoc} ;
7+ use run_make_support:: { run, rustc, rustdoc, target } ;
88
99fn setup_test_env < F : FnOnce ( & Path , & Path ) > ( callback : F ) {
1010 let out_dir = Path :: new ( "doctests" ) ;
1111 create_dir ( & out_dir) ;
12- rustc ( ) . input ( "t.rs" ) . crate_type ( "rlib" ) . run ( ) ;
12+ rustc ( ) . target ( target ( ) ) . input ( "t.rs" ) . crate_type ( "rlib" ) . run ( ) ;
1313 callback ( & out_dir, Path :: new ( "libt.rlib" ) ) ;
1414 remove_dir_all ( out_dir) ;
1515}
@@ -22,6 +22,7 @@ fn check_generated_binaries() {
2222fn main ( ) {
2323 setup_test_env ( |out_dir, extern_path| {
2424 rustdoc ( )
25+ . target ( target ( ) )
2526 . input ( "t.rs" )
2627 . arg ( "-Zunstable-options" )
2728 . arg ( "--test" )
@@ -33,6 +34,7 @@ fn main() {
3334 } ) ;
3435 setup_test_env ( |out_dir, extern_path| {
3536 rustdoc ( )
37+ . target ( target ( ) )
3638 . input ( "t.rs" )
3739 . arg ( "-Zunstable-options" )
3840 . arg ( "--test" )
@@ -49,6 +51,7 @@ fn main() {
4951 create_dir ( & run_dir_path) ;
5052
5153 rustdoc ( )
54+ . target ( target ( ) )
5255 . input ( "t.rs" )
5356 . arg ( "-Zunstable-options" )
5457 . arg ( "--test" )
Original file line number Diff line number Diff line change 33// warnings when used, and that binaries produced by it can also be successfully executed.
44// See https://github.com/rust-lang/rust/pull/23238
55
6- use run_make_support:: { run, rustc} ;
6+ use run_make_support:: { run, rustc, target } ;
77
88fn main ( ) {
9- let out = rustc ( ) . input ( "foo.rs" ) . arg ( "-Ctarget-cpu=native" ) . run ( ) . stderr_utf8 ( ) ;
9+ let out =
10+ rustc ( ) . target ( target ( ) ) . input ( "foo.rs" ) . arg ( "-Ctarget-cpu=native" ) . run ( ) . stderr_utf8 ( ) ;
1011 run ( "foo" ) ;
1112 // There should be zero warnings emitted - the bug would cause "unknown CPU `native`"
1213 // to be printed out.
You can’t perform that action at this time.
0 commit comments