From dbdbd30bf2cb0d48c8bbce83c2458592664dbb18 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 14 Nov 2020 14:47:14 +0300 Subject: expand/resolve: Turn `#[derive]` into a regular macro attribute --- compiler/rustc_parse/src/parser/attr.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_parse/src') 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) }) }) } -- cgit 1.4.1-3-g733a5