about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-05-03 14:59:01 +0900
committerGitHub <noreply@github.com>2022-05-03 14:59:01 +0900
commit0340703b780c3699eae734cabc51332489c8caeb (patch)
tree0749a69856818e268dd8dafc2a81740f99b037b3 /compiler/rustc_parse/src/parser
parent492d403f5545220a4465edcb6ba492a274a41b7f (diff)
parent6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef (diff)
downloadrust-0340703b780c3699eae734cabc51332489c8caeb.tar.gz
rust-0340703b780c3699eae734cabc51332489c8caeb.zip
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
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/item.rs4
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`