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> {
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" ) ;
Original file line number Diff line number Diff line change 99// except according to those terms.
1010
1111extern {
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
1517fn main ( ) {
Original file line number Diff line number Diff line change 1010
1111extern {
1212 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
1415 fn f2 ( & arg: u8 ) ; //~ ERROR patterns aren't allowed in foreign function declarations
16+ //~^ NOTE pattern not allowed in foreign function
1517 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
1720 fn g1 ( arg : u8 ) ; // OK
1821 fn g2 ( _: u8 ) ; // OK
1922 // fn g3(u8); // Not yet
You can’t perform that action at this time.
0 commit comments