Skip to content

Commit

Permalink
Ignore whether variants_from_header attr is outer or inner
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 23, 2021
1 parent da81086 commit 9b25214
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions syntax/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::syntax::{Derive, Doc, ForeignName};
use proc_macro2::{Ident, TokenStream};
use quote::ToTokens;
use syn::parse::{Nothing, Parse, ParseStream, Parser as _};
use syn::{AttrStyle, Attribute, Error, LitStr, Path, Result, Token};
use syn::{Attribute, Error, LitStr, Path, Result, Token};

// Intended usage:
//
Expand Down Expand Up @@ -122,10 +122,7 @@ pub fn parse(cx: &mut Errors, attrs: Vec<Attribute>, mut parser: Parser) -> Othe
break;
}
}
} else if attr.path.is_ident("variants_from_header")
&& matches!(attr.style, AttrStyle::Inner(_))
&& cfg!(feature = "experimental")
{
} else if attr.path.is_ident("variants_from_header") && cfg!(feature = "experimental") {
if let Err(err) = Nothing::parse.parse2(attr.tokens.clone()) {
cx.push(err);
}
Expand Down

0 comments on commit 9b25214

Please sign in to comment.