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-08-14 18:18:42 +02:00
2025-12-10 23:41:19 +00: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
2025-06-18 12:37:08 +02: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
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02: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
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-08-24 09:20:57 +02: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-08-25 21:31:04 +02:00
2026-01-18 22:41:00 +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
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:30:56 +00:00
2026-01-22 02:34:28 +00: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-06-16 23:04:36 +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-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-06-28 16:24:17 +05: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-08-11 16:00:49 +00: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
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-12-10 12:28:05 +01: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
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
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
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02: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-08-07 21:18:00 +00:00
2025-08-19 09:03:54 +02:00
2025-08-14 18:18:42 +02:00
2025-08-14 18:18:42 +02:00
2025-12-13 17:13:36 +01: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