Jacob Pratt
2dba56033e
Rollup merge of #151152 - nik-contrib:helper_attr_builtin, r=chenyukang
...
Add FCW for derive helper attributes that will conflict with built-in attributes
Adds a future-compatibility-warning deny-by-default lint that helps catch invalid derive helper attribute names early.
This issues the lint, saying that `ignore` helper will clash with the built-in `ignore` attribute.
```rust
#![crate_type = "proc-macro"]
#![deny(ambiguous_derive_helpers)]
use proc_macro::TokenStream;
#[proc_macro_derive(Trait, attributes(ignore))]
pub fn example(input: TokenStream) -> TokenStream {
TokenStream::new()
}
```
If you actually tried to use that `ignore` helper attribute, you won't be able to due to the ambiguity:
```rust
#[derive(Trait)]
struct Foo {
#[ignore]
field: (),
}
```
Produces:
```
error[E0659]: `ignore` is ambiguous
--> src/lib.rs:5:7
|
5 | #[ignore]
| ^^^^^^ ambiguous name
|
= note: ambiguous because of a name conflict with a builtin attribute
= note: `ignore` could refer to a built-in attribute
note: `ignore` could also refer to the derive helper attribute defined here
--> src/lib.rs:3:10
|
3 | #[derive(Trait)]
| ^^^^^
```
2026-02-12 00:41:06 -05:00
..
2025-08-29 00:49:29 +02:00
2025-06-16 23:04:33 +00:00
2025-10-18 21:17:48 +02:00
2025-09-26 15:33:48 +02:00
2025-05-03 17:22:52 +02:00
2025-08-14 18:18:42 +02:00
2025-12-10 23:41:19 +00:00
2025-05-12 16:35:09 +02:00
2025-04-17 06:25:15 +02:00
2025-11-28 02:45:42 +05:30
2025-12-09 17:29:23 +00:00
2026-02-10 19:39:19 +00:00
2026-02-10 19:39:19 +00:00
2024-03-03 10:48:40 +08:00
2025-06-18 12:37:08 +02:00
2024-08-16 09:07:55 +10:00
2025-06-08 11:25:09 +05:00
2025-06-08 11:25:09 +05:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2025-10-18 21:17:48 +02:00
2025-10-18 21:17:48 +02:00
2025-08-24 14:54:15 +02:00
2026-01-29 15:51:43 +00:00
2024-12-17 19:22:21 +08:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2025-07-11 17:02:57 +02:00
2025-07-11 17:02:57 +02:00
2025-08-06 21:38:00 +02:00
2025-08-06 21:38:00 +02:00
2024-08-06 06:12:10 +00:00
2025-01-24 01:19:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2025-12-13 20:19:20 +01:00
2025-12-13 20:19:20 +01:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2026-01-11 10:54:45 +01:00
2026-01-11 10:54:45 +01:00
2026-02-10 09:48:03 +00:00
2026-02-10 09:48:03 +00:00
2025-06-08 01:14:05 +05:00
2025-03-25 16:14:27 +11:00
2025-08-24 09:20:57 +02:00
2025-08-24 09:20:57 +02:00
2025-08-24 09:20:57 +02:00
2025-06-08 11:25:09 +05:00
2025-08-24 09:20:57 +02:00
2025-08-25 21:31:04 +02:00
2026-01-18 22:41:00 +01:00
2025-02-15 03:41:07 +01:00
2026-01-22 02:34:28 +00:00
2025-02-15 03:41:07 +01:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:34:28 +00:00
2025-02-25 18:17:32 +01:00
2025-02-25 18:17:32 +01:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:34:28 +00:00
2026-01-22 02:30:56 +00:00
2026-01-22 02:34:28 +00:00
2025-06-08 11:25:09 +05:00
2025-06-08 11:25:09 +05:00
2025-02-28 09:43:46 +01:00
2026-02-04 10:54:45 +01:00
2026-02-04 10:54:45 +01:00
2026-02-04 10:54:45 +01:00
2026-02-04 10:54:45 +01:00
2025-04-02 06:21:18 +11:00
2024-12-27 19:58:16 +11:00
2024-12-12 23:36:27 +00:00
2024-12-27 19:58:16 +11:00
2025-06-16 23:04:36 +00:00
2024-02-16 20:02:50 +00:00
2023-01-11 09:32:08 +00:00
2025-08-14 18:18:42 +02:00
2025-09-27 19:32:14 +02:00
2025-06-20 15:06:29 +02:00
2025-06-20 15:06:29 +02:00
2025-12-10 12:28:05 +01:00
2025-12-10 12:28:05 +01:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-09-26 15:33:48 +02:00
2025-07-19 01:42:30 +08:00
2025-08-14 03:39:32 +02:00
2025-06-02 16:30:21 +08:00
2025-06-02 16:30:21 +08:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-06-28 16:24:17 +05:00
2025-04-02 06:21:18 +11:00
2025-06-29 15:37:33 +05:00
2025-12-31 03:01:05 +01:00
2025-12-31 03:01:05 +01:00
2025-10-22 21:43:50 +02:00
2025-10-22 21:43:50 +02:00
2025-09-21 10:42:47 -04:00
2025-12-31 03:01:05 +01:00
2025-12-31 03:01:05 +01:00
2025-12-13 15:13:04 +01:00
2025-12-13 17:13:36 +01:00
2025-06-18 12:37:08 +02:00
2025-06-18 12:37:08 +02:00
2025-04-05 06:09:14 +09:00
2025-08-11 16:00:49 +00:00
2024-02-16 20:02:50 +00:00
2025-04-08 23:06:31 +03:00
2024-07-12 03:02:57 +00:00
2023-01-11 09:32:08 +00:00
2025-02-24 14:31:19 +01:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-12-10 20:18:42 +01:00
2025-12-10 20:18:42 +01:00
2024-04-17 09:18:14 -04:00
2023-12-12 15:54:25 +11:00
2023-12-12 15:54:25 +11:00
2025-10-20 19:14:46 +03:00
2025-12-10 12:28:05 +01:00
2025-12-10 12:28:05 +01:00
2025-01-07 16:04:14 +01:00
2025-12-10 12:28:05 +01:00
2023-01-11 09:32:08 +00:00
2025-02-10 20:21:39 +00:00
2025-10-04 11:22:56 +02:00
2025-10-04 11:22:56 +02:00
2025-10-18 21:17:48 +02:00
2025-08-14 18:18:42 +02:00
2025-10-08 08:32:03 +02:00
2025-08-16 10:51:09 +02:00
2025-08-19 21:27:10 +02:00
2024-02-16 20:02:50 +00:00
2023-08-07 21:14:28 +02:00
2023-11-24 19:15:52 +01:00
2023-01-11 09:32:08 +00:00
2023-11-24 19:15:52 +01:00
2026-02-09 07:59:24 -08:00
2026-02-09 07:59:24 -08:00
2025-12-09 01:16:05 +00:00
2025-12-13 17:13:36 +01:00
2025-12-13 15:14:01 +01:00
2025-12-13 17:13:36 +01:00
2026-02-10 10:17:24 +01:00
2026-02-10 10:17:24 +01:00
2025-10-18 21:17:48 +02:00
2026-01-18 22:41:00 +01:00
2025-07-06 22:07:09 +02:00
2025-12-12 14:55:17 +01:00
2025-09-09 21:54:54 +02:00
2025-12-13 17:13:36 +01:00
2024-08-18 20:32:00 +03:00
2024-08-18 20:32:00 +03:00
2024-11-26 02:50:48 +08:00
2025-06-26 08:50:42 +02:00
2025-06-26 08:50:42 +02:00
2025-06-26 08:50:42 +02:00
2025-06-26 08:50:42 +02:00
2025-06-26 08:50:42 +02:00
2025-06-26 08:50:42 +02:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-10-08 17:46:33 +02:00
2025-10-08 17:46:33 +02:00
2025-08-22 08:58:45 +02:00
2025-08-22 08:58:45 +02:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-03-15 10:52:07 -06:00
2025-11-04 09:56:17 +01:00
2025-11-04 09:56:17 +01:00
2025-11-07 13:59:44 +01:00
2025-11-07 13:59:44 +01:00
2025-07-05 01:54:04 +05:00
2025-02-24 14:31:19 +01:00
2025-02-24 14:31:19 +01:00
2024-10-02 23:19:26 -05:00
2025-08-07 21:18:00 +00:00
2025-08-19 09:03:54 +02:00
2025-08-14 18:18:42 +02:00
2024-08-24 23:05:37 +03:00
2024-08-24 23:05:37 +03:00
2025-08-14 18:18:42 +02:00
2025-12-13 17:13:36 +01:00
2023-10-24 08:21:52 +00:00
2023-10-24 08:21:52 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-02-16 20:02:50 +00:00
2023-01-11 09:32:08 +00:00
2023-01-11 09:32:08 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2023-12-12 15:54:25 +11:00
2023-12-12 15:54:25 +11:00
2025-05-21 00:47:36 +08:00
2025-05-21 00:47:36 +08:00
2025-06-02 16:30:21 +08:00
2025-02-24 04:04:59 +01:00
2025-02-24 04:04:59 +01:00
2024-02-16 20:02:50 +00:00
2025-06-27 08:58:26 +02:00
2025-06-27 08:58:26 +02:00
2025-06-27 08:58:26 +02:00
2025-08-11 16:00:49 +00:00
2024-02-24 08:14:38 -05:00
2024-02-24 08:14:38 -05:00
2024-11-26 02:50:48 +08:00