File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
src/tools/compiletest/src
notify-all-emit-artifacts
rustdoc-scrape-examples-macros Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -3463,7 +3463,7 @@ impl<'test> TestCx<'test> {
34633463 // to the `rmake_out` directory.
34643464 for path in walkdir:: WalkDir :: new ( & self . testpaths . file ) . min_depth ( 1 ) {
34653465 let path = path. unwrap ( ) . path ( ) . to_path_buf ( ) ;
3466- if path. file_name ( ) . map ( |s| s != OsStr :: new ( "rmake.rs" ) ) . unwrap_or ( false ) {
3466+ if path. file_name ( ) . is_some_and ( |s| s != "rmake.rs" ) {
34673467 let target = rmake_out_dir. join ( path. strip_prefix ( & self . testpaths . file ) . unwrap ( ) ) ;
34683468 if path. is_dir ( ) {
34693469 copy_dir_all ( & path, target) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ fn main() {
2121 run ( "bar" ) ;
2222
2323 let expected_extension = dynamic_lib_extension ( ) ;
24- read_dir ( std :: env :: current_dir ( ) . unwrap ( ) , |path| {
24+ read_dir ( cwd ( ) , |path| {
2525 if path. is_file ( )
2626 && path. extension ( ) . is_some_and ( |ext| ext == expected_extension)
2727 && path. file_name ( ) . and_then ( |name| name. to_str ( ) ) . is_some_and ( |name| {
Original file line number Diff line number Diff line change 22
33use std:: fs;
44
5- use run_make_support:: rustc;
5+ use run_make_support:: { cwd , rustc} ;
66
77fn main ( ) {
88 rustc ( ) . input ( "input.rs" ) . run_fail_assert_exit_code ( 1 ) ;
99
10- for entry in fs:: read_dir ( std :: env :: current_dir ( ) . unwrap ( ) ) . unwrap ( ) {
10+ for entry in fs:: read_dir ( cwd ( ) ) . unwrap ( ) {
1111 let entry = entry. unwrap ( ) ;
1212 let path = entry. path ( ) ;
1313
Original file line number Diff line number Diff line change 66// See <https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477>
77extern crate run_make_support;
88
9- use run_make_support:: rustc;
9+ use run_make_support:: { cwd , rustc} ;
1010
1111fn main ( ) {
1212 // With single codegen unit files are renamed to match the source file name
@@ -17,7 +17,7 @@ fn main() {
1717 . codegen_units ( 1 )
1818 . json ( "artifacts" )
1919 . error_format ( "json" )
20- . incremental ( & std :: env :: current_dir ( ) . unwrap ( ) )
20+ . incremental ( cwd ( ) )
2121 . run ( ) ;
2222 let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
2323 for file in & [ "lib.o" , "lib.ll" , "lib.bc" , "lib.s" ] {
@@ -33,7 +33,7 @@ fn main() {
3333 . codegen_units ( 2 )
3434 . json ( "artifacts" )
3535 . error_format ( "json" )
36- . incremental ( & std :: env :: current_dir ( ) . unwrap ( ) )
36+ . incremental ( cwd ( ) )
3737 . run ( ) ;
3838 let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
3939 for file in & [ "rcgu.o" , "rcgu.ll" , "rcgu.bc" , "rcgu.s" ] {
Original file line number Diff line number Diff line change 11//@ ignore-cross-compile
22
3- use run_make_support:: { htmldocck, rustc, rustdoc} ;
3+ use run_make_support:: { htmldocck, rustc, rustdoc, rust_lib_name } ;
44
55fn main ( ) {
66 let out_dir = "rustdoc" ;
@@ -40,7 +40,7 @@ fn main() {
4040 . crate_name ( "ex" )
4141 . crate_type ( "bin" )
4242 . output ( & out_dir)
43- . extern_ ( crate_name, format ! ( "lib{ crate_name}.rlib" ) )
43+ . extern_ ( crate_name, rust_lib_name ( crate_name) )
4444 . extern_ ( proc_crate_name, dylib_name. trim ( ) )
4545 . arg ( "-Zunstable-options" )
4646 . arg ( "--scrape-examples-output-path" )
You can’t perform that action at this time.
0 commit comments