From 6c7f4dee8f26a6bbe2970d735f8dc2cbaa0a5eef Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Mon, 2 May 2022 18:14:43 +0900 Subject: Fix invalid keyword order for function declarations --- compiler/rustc_parse/src/parser/item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_parse/src/parser') 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` -- cgit 1.4.1-3-g733a5