Skip to content

Commit f656a92

Browse files
committed
Update error format for E0130
1 parent ae77410 commit f656a92

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/librustc_passes/ast_validation.rs

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

src/test/compile-fail/E0130.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
// except according to those terms.
1010

1111
extern {
12-
fn foo((a, b): (u32, u32)); //~ ERROR E0130
12+
fn foo((a, b): (u32, u32));
13+
//~^ ERROR E0130
14+
//~| NOTE pattern not allowed in foreign function
1315
}
1416

1517
fn main() {

0 commit comments

Comments
 (0)