Update error format for E0130

This commit is contained in:
trixnz 2016-08-04 23:15:58 +02:00 committed by trixnz
parent ae77410350
commit f656a92cbb
2 changed files with 4 additions and 1 deletions

View File

@ -183,6 +183,7 @@ impl<'a> Visitor for AstValidator<'a> {
E0130,
"patterns aren't allowed in foreign function \
declarations");
err.span_label(span, &format!("pattern not allowed in foreign function"));
if is_recent {
err.span_note(span,
"this is a recent error, see issue #35203 for more details");

View File

@ -9,7 +9,9 @@
// except according to those terms.
extern {
fn foo((a, b): (u32, u32)); //~ ERROR E0130
fn foo((a, b): (u32, u32));
//~^ ERROR E0130
//~| NOTE pattern not allowed in foreign function
}
fn main() {