diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-18 05:16:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 05:16:29 +0200 |
| commit | 540fb228af41bbc937adc15d98cd72fabaff95c2 (patch) | |
| tree | 494fc5f17f9fe68015d160e647a7ca7e20033d8d /compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | |
| parent | 5e8bc7f4d35bf71142c2913721143bc3856efecc (diff) | |
| parent | 846c10fecfdbda6e43073af226486ff7ec3f873d (diff) | |
| download | rust-540fb228af41bbc937adc15d98cd72fabaff95c2.tar.gz rust-540fb228af41bbc937adc15d98cd72fabaff95c2.zip | |
Rollup merge of #139615 - nnethercote:rm-name_or_empty, r=jdonszelmann
Remove `name_or_empty` Another step towards #137978. r? ``@jdonszelmann``
Diffstat (limited to 'compiler/rustc_builtin_macros/src/deriving/generic/mod.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/deriving/generic/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs index b9197be4442..d9aac54ee73 100644 --- a/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs +++ b/compiler/rustc_builtin_macros/src/deriving/generic/mod.rs @@ -527,15 +527,14 @@ impl<'a> TraitDef<'a> { item.attrs .iter() .filter(|a| { - [ + a.has_any_name(&[ sym::allow, sym::warn, sym::deny, sym::forbid, sym::stable, sym::unstable, - ] - .contains(&a.name_or_empty()) + ]) }) .cloned(), ); |
