<!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. If you cannot produce a minimal reproduction case (something that would work in isolation), please provide the steps or even link to a repository that causes the problematic output to occur. --> Given the following code ([playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=1b788bae1dfa4ef4ab19acad7284c2e1)): <!-- Please provide a link to play.rust-lang.org --> ```rust extern "C" unsafe fn test() {} ``` The current output is: ``` error: expected `{`, found keyword `unsafe` --> src/lib.rs:1:12 | 1 | extern "C" unsafe fn test() {} | ^^^^^^ expected `{` error: could not compile `playground` due to previous error ``` <!-- The following is not always necessary. --> Ideally the output should look like the one for inverting `unsafe` and a visibility like `pub`: ``` error: expected one of `extern` or `fn`, found keyword `pub` --> src/main.rs:1:8 | 1 | unsafe pub fn test() {} | -------^^^ | | | | | expected one of `extern` or `fn` | help: visibility `pub` must come before `unsafe`: `pub unsafe` error: could not compile `playground` due to previous error ``` <!-- If the problem is not self-explanatory, please provide a rationale for the change. --> <!-- If dramatically different output is caused by small changes, consider also adding them here. If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. The output might also be different depending on the Edition. --> Meta `rustc -V`: ``` rustc 1.55.0-nightly (74ef0c3e4 2021-07-16) ``` <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"poliorcetics"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->