File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ impl<'a> Visitor for AstValidator<'a> {
183
183
E0130 ,
184
184
"patterns aren't allowed in foreign function \
185
185
declarations") ;
186
+ err. span_label ( span, & format ! ( "pattern not allowed in foreign function" ) ) ;
186
187
if is_recent {
187
188
err. span_note ( span,
188
189
"this is a recent error, see issue #35203 for more details" ) ;
Original file line number Diff line number Diff line change 9
9
// except according to those terms.
10
10
11
11
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
13
15
}
14
16
15
17
fn main ( ) {
Original file line number Diff line number Diff line change 10
10
11
11
extern {
12
12
fn f1 ( mut arg : u8 ) ; //~ ERROR patterns aren't allowed in foreign function declarations
13
- //~^ NOTE this is a recent error
13
+ //~^ NOTE pattern not allowed in foreign function
14
+ //~| NOTE this is a recent error
14
15
fn f2 ( & arg: u8 ) ; //~ ERROR patterns aren't allowed in foreign function declarations
16
+ //~^ NOTE pattern not allowed in foreign function
15
17
fn f3 ( arg @ _: u8 ) ; //~ ERROR patterns aren't allowed in foreign function declarations
16
- //~^ NOTE this is a recent error
18
+ //~^ NOTE pattern not allowed in foreign function
19
+ //~| NOTE this is a recent error
17
20
fn g1 ( arg : u8 ) ; // OK
18
21
fn g2 ( _: u8 ) ; // OK
19
22
// fn g3(u8); // Not yet
You can’t perform that action at this time.
0 commit comments