Jacob Pratt
1e6df58e77
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`
```
2025-08-20 00:45:53 -04:00
..
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-08 23:06:31 +03:00
2025-08-05 07:10:31 +05:00
2025-08-14 13:53:57 -07:00
2025-07-31 13:55:59 +08:00
2025-07-05 00:45:24 +05:00
2025-08-19 21:27:10 +02:00
2025-08-19 21:27:10 +02:00
2025-04-08 23:06:31 +03:00
2025-08-05 07:10:31 +05:00
2025-08-05 07:10:31 +05:00
2025-08-05 07:10:31 +05:00
2025-08-05 07:10:31 +05:00
2025-08-05 07:10:31 +05:00
2025-06-13 18:13:34 +02:00
2025-06-13 18:13:34 +02:00
2025-06-13 18:13:34 +02:00
2025-07-01 16:10:05 +02:00
2025-08-11 17:02:32 +00:00
2025-07-15 12:00:46 +08:00
2025-07-15 12:00:46 +08:00
2025-06-11 17:11:58 +02:00
2025-06-11 17:11:58 +02:00
2025-06-03 13:28:38 +02:00
2025-06-26 13:46:45 +00:00
2025-06-29 04:56:28 +02:00
2025-04-18 15:57:29 +02:00
2025-03-07 17:55:08 +00:00
2025-04-17 19:45:28 +08:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-03-20 16:01:13 +00:00
2025-03-20 16:02:24 +00:00
2025-04-03 21:41:58 +00:00
2025-08-11 16:58:21 -05:00
2025-08-11 16:58:21 -05:00
2025-04-18 15:57:29 +02:00
2025-07-18 20:34:58 +08:00
2025-07-18 20:34:58 +08:00
2025-05-07 22:56:14 +08:00
2025-05-07 22:56:14 +08:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-06-16 23:07:11 +08:00
2025-06-16 23:07:11 +08:00
2025-07-05 00:45:24 +05:00
2025-07-25 20:38:54 +05:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-07-31 21:25:49 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-03 21:41:58 +00:00
2025-06-03 11:45:58 +02:00
2025-04-02 06:20:35 +11:00
2025-04-02 06:20:35 +11:00
2025-04-08 23:06:31 +03:00
2025-08-07 21:39:00 +00:00
2025-05-03 22:49:23 +03:00
2025-05-03 22:49:23 +03:00
2025-04-03 21:41:58 +00:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-08-09 16:27:20 +05:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-07-10 18:47:20 +05:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2025-08-14 21:31:47 +08:00
2025-08-14 21:31:47 +08:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-07-31 13:55:59 +08:00
2025-04-10 09:56:37 +02:00
2025-07-31 13:55:59 +08:00
2025-08-14 21:31:47 +08:00
2025-05-16 12:40:04 +02:00
2025-05-16 12:40:04 +02:00
2025-05-16 12:40:04 +02:00
2025-03-29 13:30:20 +03:00
2025-03-29 13:30:20 +03:00
2025-06-30 11:23:01 +05:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-07-01 15:29:29 +05:00
2025-08-14 21:31:47 +08:00
2025-03-21 22:55:00 -06:00
2025-04-25 17:02:59 +05:00
2025-04-25 17:02:59 +05:00
2025-04-25 17:02:59 +05:00
2025-08-14 21:31:47 +08:00
2025-05-09 15:31:27 +00:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-06-28 17:04:16 +05:00
2025-04-08 23:06:31 +03:00
2025-04-03 21:41:58 +00:00
2025-04-18 15:57:29 +02:00
2025-04-18 15:57:29 +02:00
2025-04-03 21:41:58 +00:00
2025-03-25 15:16:16 +01:00
2025-03-25 15:16:16 +01:00
2025-08-14 21:31:36 +08:00
2025-08-14 21:31:47 +08:00
2025-07-13 00:03:31 +05:00
2025-05-14 13:32:59 +01:00
2025-05-14 13:32:59 +01:00
2025-06-03 13:28:38 +02:00
2025-04-03 21:41:58 +00:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:49 +02:00
2025-07-01 19:00:21 +00:00
2025-07-01 19:00:21 +00:00
2025-08-16 16:15:58 +02:00
2025-08-16 16:15:58 +02:00
2025-08-16 16:15:58 +02:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:49 +02:00
2025-07-18 12:13:19 +02:00
2025-08-19 21:27:10 +02:00
2025-04-24 02:57:10 +02:00
2025-03-25 15:15:21 +01:00
2025-03-25 15:15:21 +01:00
2025-07-31 13:55:59 +08:00
2025-07-05 03:46:08 +05:00
2025-07-05 03:46:08 +05:00
2025-07-05 03:46:08 +05:00
2025-03-29 13:30:20 +03:00
2025-03-29 13:30:20 +03:00
2025-07-23 13:48:04 +02:00
2025-05-27 15:57:41 +00:00
2025-05-27 15:57:41 +00:00
2025-06-30 11:50:19 +05:00
2025-06-30 11:23:01 +05:00
2025-03-29 13:30:20 +03:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 21:41:58 +00:00