File tree 5 files changed +9
-9
lines changed
src/tools/compiletest/src
notify-all-emit-artifacts
rustdoc-scrape-examples-macros
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> {
3463
3463
// to the `rmake_out` directory.
3464
3464
for path in walkdir:: WalkDir :: new ( & self . testpaths . file ) . min_depth ( 1 ) {
3465
3465
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" ) {
3467
3467
let target = rmake_out_dir. join ( path. strip_prefix ( & self . testpaths . file ) . unwrap ( ) ) ;
3468
3468
if path. is_dir ( ) {
3469
3469
copy_dir_all ( & path, target) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ fn main() {
21
21
run ( "bar" ) ;
22
22
23
23
let expected_extension = dynamic_lib_extension ( ) ;
24
- read_dir ( std :: env :: current_dir ( ) . unwrap ( ) , |path| {
24
+ read_dir ( cwd ( ) , |path| {
25
25
if path. is_file ( )
26
26
&& path. extension ( ) . is_some_and ( |ext| ext == expected_extension)
27
27
&& path. file_name ( ) . and_then ( |name| name. to_str ( ) ) . is_some_and ( |name| {
Original file line number Diff line number Diff line change 2
2
3
3
use std:: fs;
4
4
5
- use run_make_support:: rustc;
5
+ use run_make_support:: { cwd , rustc} ;
6
6
7
7
fn main ( ) {
8
8
rustc ( ) . input ( "input.rs" ) . run_fail_assert_exit_code ( 1 ) ;
9
9
10
- for entry in fs:: read_dir ( std :: env :: current_dir ( ) . unwrap ( ) ) . unwrap ( ) {
10
+ for entry in fs:: read_dir ( cwd ( ) ) . unwrap ( ) {
11
11
let entry = entry. unwrap ( ) ;
12
12
let path = entry. path ( ) ;
13
13
Original file line number Diff line number Diff line change 6
6
// See <https://internals.rust-lang.org/t/easier-access-to-files-generated-by-emit-foo/20477>
7
7
extern crate run_make_support;
8
8
9
- use run_make_support:: rustc;
9
+ use run_make_support:: { cwd , rustc} ;
10
10
11
11
fn main ( ) {
12
12
// With single codegen unit files are renamed to match the source file name
@@ -17,7 +17,7 @@ fn main() {
17
17
. codegen_units ( 1 )
18
18
. json ( "artifacts" )
19
19
. error_format ( "json" )
20
- . incremental ( & std :: env :: current_dir ( ) . unwrap ( ) )
20
+ . incremental ( cwd ( ) )
21
21
. run ( ) ;
22
22
let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
23
23
for file in & [ "lib.o" , "lib.ll" , "lib.bc" , "lib.s" ] {
@@ -33,7 +33,7 @@ fn main() {
33
33
. codegen_units ( 2 )
34
34
. json ( "artifacts" )
35
35
. error_format ( "json" )
36
- . incremental ( & std :: env :: current_dir ( ) . unwrap ( ) )
36
+ . incremental ( cwd ( ) )
37
37
. run ( ) ;
38
38
let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
39
39
for file in & [ "rcgu.o" , "rcgu.ll" , "rcgu.bc" , "rcgu.s" ] {
Original file line number Diff line number Diff line change 1
1
//@ ignore-cross-compile
2
2
3
- use run_make_support:: { htmldocck, rustc, rustdoc} ;
3
+ use run_make_support:: { htmldocck, rustc, rustdoc, rust_lib_name } ;
4
4
5
5
fn main ( ) {
6
6
let out_dir = "rustdoc" ;
@@ -40,7 +40,7 @@ fn main() {
40
40
. crate_name ( "ex" )
41
41
. crate_type ( "bin" )
42
42
. output ( & out_dir)
43
- . extern_ ( crate_name, format ! ( "lib{ crate_name}.rlib" ) )
43
+ . extern_ ( crate_name, rust_lib_name ( crate_name) )
44
44
. extern_ ( proc_crate_name, dylib_name. trim ( ) )
45
45
. arg ( "-Zunstable-options" )
46
46
. arg ( "--scrape-examples-output-path" )
You can’t perform that action at this time.
0 commit comments