Skip to content

Commit 3a3691f

Browse files
committed
when there are multiple filenames, print what got interpreted as 2nd filename
1 parent 3e58dab commit 3a3691f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/librustc_driver/lib.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,15 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
839839
early_error(sopts.error_format, "no input filename given");
840840
}
841841
1 => panic!("make_input should have provided valid inputs"),
842-
_ => early_error(sopts.error_format, "multiple input filenames provided"),
842+
_ =>
843+
early_error(
844+
sopts.error_format,
845+
&format!(
846+
"multiple input filenames provided (first two filenames are `{}` and `{}`)",
847+
matches.free[0],
848+
matches.free[1],
849+
),
850+
)
843851
}
844852
}
845853

0 commit comments

Comments
 (0)