rust/tests/ui/parser/issues/issue-19398.stderr
Tamme Dittrich 3fdc99193e Improve error message for extern "C" unsafe fn()
This was handled correctly already for `extern unsafe fn()`.

Co-authored-by: Folkert <folkert@folkertdev.nl>
2024-07-26 15:14:05 +02:00

14 lines
450 B
Plaintext

error: expected `fn`, found keyword `unsafe`
--> $DIR/issue-19398.rs:2:19
|
LL | extern "Rust" unsafe fn foo();
| --------------^^^^^^
| | |
| | expected `fn`
| help: `unsafe` must come before `extern "Rust"`: `unsafe extern "Rust"`
|
= note: keyword order for functions declaration is `pub`, `default`, `const`, `async`, `unsafe`, `extern`
error: aborting due to 1 previous error