Skip to content

Commit

Permalink
when there are multiple filenames, print what got interpreted as 2nd …
Browse files Browse the repository at this point in the history
…filename
  • Loading branch information
RalfJung committed Feb 10, 2019
1 parent 3e58dab commit 3a3691f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
),
)
}
}

Expand Down

0 comments on commit 3a3691f

Please sign in to comment.