diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 425dda5a1e1fa..0e6e446728884 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -511,9 +511,9 @@ fn make_input( Ok(Some(Input::Str { name, input })) } [ifile] => Ok(Some(Input::File(PathBuf::from(ifile)))), - _ => early_dcx.early_fatal(format!( + [ifile1, ifile2, ..] => early_dcx.early_fatal(format!( "multiple input filenames provided (first two filenames are `{}` and `{}`)", - free_matches[0], free_matches[1], + ifile1, ifile2 )), } }