diff options
| author | bors <bors@rust-lang.org> | 2023-11-04 14:33:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-04 14:33:39 +0000 |
| commit | f81d6f0cb00b1e314107b81bcb9aa72b9df9f564 (patch) | |
| tree | 513b8276ab23493ffd10aef05f7d9d8a916c2660 /compiler/rustc_mir_transform/src | |
| parent | 2db26d3d55387930f1b1dfb84810bcde5a787a09 (diff) | |
| parent | f0e83308791698b47a738c8fe0a762624c88a2e0 (diff) | |
| download | rust-f81d6f0cb00b1e314107b81bcb9aa72b9df9f564.tar.gz rust-f81d6f0cb00b1e314107b81bcb9aa72b9df9f564.zip | |
Auto merge of #117094 - Nadrieril:warn-lint-on-arm, r=cjgillot
Warn users who set `non_exhaustive_omitted_patterns` lint level on a match arm
Before https://github.com/rust-lang/rust/pull/116734, the recommended usage of the [`non_exhaustive_omitted_patterns` lint](https://github.com/rust-lang/rust/issues/89554) was:
```rust
match Bar::A {
Bar::A => {},
#[warn(non_exhaustive_omitted_patterns)]
_ => {},
}
```
After https://github.com/rust-lang/rust/pull/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`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions
