diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-08-20 00:45:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 00:45:53 -0400 |
| commit | 1e6df58e777f3504de7eeb94c5c2fd7f0387d181 (patch) | |
| tree | 3d3d57c60b910e6275ceb018247edc602c17e124 /tests/coverage/branch/lazy-boolean.rs | |
| parent | 9a1ab5e4023c47dc4fdb2575959d60222c7dccc9 (diff) | |
| parent | d14b83e378c421dd09320ace833a9d47848e3046 (diff) | |
| download | rust-1e6df58e777f3504de7eeb94c5c2fd7f0387d181.tar.gz rust-1e6df58e777f3504de7eeb94c5c2fd7f0387d181.zip | |
Rollup merge of #140794 - karolzwolak:allow-unused-doc-65464, r=davidtwco
mention lint group in default level lint note
### Summary
This PR updates lint diagnostics so that default-level notes now mention the lint group they belong to, if any.
Fixes: rust-lang/rust#65464.
### Example
```rust
fn main() {
let x = 5;
}
```
Before:
```
= note: `#[warn(unused_variables)]` on by default
```
After:
```
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
```
### Unchanged Cases
Messages remain the same when the lint level is explicitly set, e.g.:
* Attribute on the lint `#[warn(unused_variables)]`:
```
note: the lint level is defined here
LL | #[warn(unused_variables)]
| ^^^^^^^^^^^^^^^^
```
* Attribute on the group `#[warn(unused)]:`:
```
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
```
* CLI option `-W unused`:
```
= note: `-W unused-variables` implied by `-W unused`
= help: to override `-W unused` add `#[allow(unused_variables)]`
```
* CLI option `-W unused-variables`:
```
= note: requested on the command line with `-W unused-variables`
```
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions
