From 3a3691f1878bf3727585c982526c9db5a79c746c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 10 Feb 2019 12:58:08 +0100 Subject: [PATCH] when there are multiple filenames, print what got interpreted as 2nd filename --- src/librustc_driver/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index a95ce810ffaeb..fe02dd27072f7 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -839,7 +839,15 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { early_error(sopts.error_format, "no input filename given"); } 1 => panic!("make_input should have provided valid inputs"), - _ => early_error(sopts.error_format, "multiple input filenames provided"), + _ => + early_error( + sopts.error_format, + &format!( + "multiple input filenames provided (first two filenames are `{}` and `{}`)", + matches.free[0], + matches.free[1], + ), + ) } }