Rollup merge of #96629 - ken-matsui:fix-invalid-keyword-order-for-function-declarations, r=davidtwco
Fix invalid keyword order for function declarations Closes: https://github.com/rust-lang/rust/issues/94879
This commit is contained in:
commit
0340703b78
14 changed files with 36 additions and 14 deletions
|
@ -1020,7 +1020,7 @@ impl<'a> Parser<'a> {
|
|||
&format!("`{}` must come before `{}`", invalid_qual, current_qual),
|
||||
format!("{} {}", invalid_qual, current_qual),
|
||||
Applicability::MachineApplicable,
|
||||
).note("keyword order for functions declaration is `default`, `pub`, `const`, `async`, `unsafe`, `extern`");
|
||||
).note("keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`");
|
||||
}
|
||||
}
|
||||
Err(err)
|
||||
|
@ -2086,7 +2086,7 @@ impl<'a> Parser<'a> {
|
|||
&format!("`{misplaced_qual}` must come before `{current_qual}`"),
|
||||
format!("{misplaced_qual} {current_qual}"),
|
||||
Applicability::MachineApplicable,
|
||||
).note("keyword order for functions declaration is `default`, `pub`, `const`, `async`, `unsafe`, `extern`");
|
||||
).note("keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`");
|
||||
}
|
||||
}
|
||||
// Recover incorrect visibility order such as `async pub`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue