You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add targeted suggestion for incompatible {un,}safe keywords when parsing fn-frontmatter-like fragments
The diagnostics now look like:
```
error: expected one of `extern` or `fn`, found keyword `unsafe`
--> $DIR/incompatible-safe-unsafe-keywords-extern-block-1.rs:28:6
|
LL | safe unsafe extern {}
| ^^^^^^ expected one of `extern` or `fn`
|
help: `safe` and `unsafe` are incompatible, use only one of the keywords
--> $DIR/incompatible-safe-unsafe-keywords-extern-block-1.rs:28:1
|
LL | safe unsafe extern {}
| ^^^^^^^^^^^
error: aborting due to 1 previous error
```
whereas previously two suggestions created a cycle prompting the user to
keep reordering `unsafe` and `safe`. No suggestions are offered here
because the user needs to pick one, and user intent is not clear-cut.
0 commit comments