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
Auto merge of rust-lang#117094 - Nadrieril:warn-lint-on-arm, r=cjgillot
Warn users who set `non_exhaustive_omitted_patterns` lint level on a match arm
Before rust-lang#116734, the recommended usage of the [`non_exhaustive_omitted_patterns` lint](rust-lang#89554) was:
```rust
match Bar::A {
Bar::A => {},
#[warn(non_exhaustive_omitted_patterns)]
_ => {},
}
```
After rust-lang#116734 this no longer makes sense, and recommended usage is now:
```rust
#[warn(non_exhaustive_omitted_patterns)]
match Bar::A {
Bar::A => {},
_ => {},
}
```
As you can guess, this silently breaks all uses of the lint that used the previous form. This is a problem in particular because `syn` recommends usage of this lint to its users in the old way. This PR emits a warning when the previous form is used so users can update.
r? `@cjgillot`
0 commit comments