diff options
| author | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-05-02 18:14:43 +0900 |
|---|---|---|
| committer | Ken Matsui <26405363+ken-matsui@users.noreply.github.com> | 2022-05-02 18:14:43 +0900 |
| commit | 6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef (patch) | |
| tree | 2b490fba291caeba1150522569bdcd4e6c7bda6d /compiler/rustc_parse | |
| parent | 4dd8b420c027001e47b0d811a7e55e2fe1de1395 (diff) | |
| download | rust-6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef.tar.gz rust-6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef.zip | |
Fix invalid keyword order for function declarations
Diffstat (limited to 'compiler/rustc_parse')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 10f1daf1129..77a03428c16 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -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` |
