We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae77410 commit f656a92Copy full SHA for f656a92
src/librustc_passes/ast_validation.rs
@@ -183,6 +183,7 @@ impl<'a> Visitor for AstValidator<'a> {
183
E0130,
184
"patterns aren't allowed in foreign function \
185
declarations");
186
+ err.span_label(span, &format!("pattern not allowed in foreign function"));
187
if is_recent {
188
err.span_note(span,
189
"this is a recent error, see issue #35203 for more details");
src/test/compile-fail/E0130.rs
@@ -9,7 +9,9 @@
9
// except according to those terms.
10
11
extern {
12
- fn foo((a, b): (u32, u32)); //~ ERROR E0130
+ fn foo((a, b): (u32, u32));
13
+ //~^ ERROR E0130
14
+ //~| NOTE pattern not allowed in foreign function
15
}
16
17
fn main() {
0 commit comments