File tree 2 files changed +4
-4
lines changed
src/tools/run-make-support/src
tests/run-make/output-type-permutations
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,8 @@ pub fn not_contains<P: AsRef<Path>>(path: P, expected: &str) -> bool {
296
296
}
297
297
298
298
/// Returns true if the filename at `path` is not in `expected`.
299
- pub fn filename_not_in_denylist < P : AsRef < Path > > ( path : P , expected : & [ String ] ) -> bool {
299
+ pub fn filename_not_in_denylist < P : AsRef < Path > , V : AsRef < [ String ] > > ( path : P , expected : V ) -> bool {
300
+ let expected = expected. as_ref ( ) ;
300
301
path. as_ref ( )
301
302
. file_name ( )
302
303
. is_some_and ( |name| !expected. contains ( & name. to_str ( ) . unwrap ( ) . to_owned ( ) ) )
Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ use std::path::PathBuf;
17
17
// `rustc_invocation`: the rustc command being tested
18
18
// Any unexpected output files not listed in `must_exist` or `can_exist` will cause a failure.
19
19
fn assert_expected_output_files ( expectations : Expectations , rustc_invocation : impl Fn ( ) ) {
20
- let must_exist = expectations. expected_files ;
21
- let can_exist = expectations. allowed_files ;
22
- let dir = expectations. test_dir ;
20
+ let Expectations { expected_files : must_exist, allowed_files : can_exist, test_dir : dir } =
21
+ expectations;
23
22
24
23
fs_wrapper:: create_dir ( & dir) ;
25
24
rustc_invocation ( ) ;
You can’t perform that action at this time.
0 commit comments