diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-11-14 14:47:14 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2021-02-07 20:08:45 +0300 |
| commit | dbdbd30bf2cb0d48c8bbce83c2458592664dbb18 (patch) | |
| tree | 92877e16f45e3cf927ffc4296e0f90c48ec036f5 /compiler/rustc_parse/src/parser/attr.rs | |
| parent | ae00b62ceb7eaf1f02f5289ab233bf7e0e8060d5 (diff) | |
| download | rust-dbdbd30bf2cb0d48c8bbce83c2458592664dbb18.tar.gz rust-dbdbd30bf2cb0d48c8bbce83c2458592664dbb18.zip | |
expand/resolve: Turn `#[derive]` into a regular macro attribute
Diffstat (limited to 'compiler/rustc_parse/src/parser/attr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index 1b26fb33370..523eb9dba35 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -306,13 +306,11 @@ impl<'a> Parser<'a> { } pub fn maybe_needs_tokens(attrs: &[ast::Attribute]) -> bool { - // One of the attributes may either itself be a macro, or apply derive macros (`derive`), + // One of the attributes may either itself be a macro, // or expand to macro attributes (`cfg_attr`). attrs.iter().any(|attr| { attr.ident().map_or(true, |ident| { - ident.name == sym::derive - || ident.name == sym::cfg_attr - || !rustc_feature::is_builtin_attr_name(ident.name) + ident.name == sym::cfg_attr || !rustc_feature::is_builtin_attr_name(ident.name) }) }) } |
