when there are multiple filenames, print what got interpreted as 2nd filename

This commit is contained in:
Ralf Jung 2019-02-10 12:58:08 +01:00
parent 3e58dabc16
commit 3a3691f187

View file

@ -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],
),
)
}
}