make it compile again

This commit is contained in:
flip1995 2018-04-17 15:33:39 +02:00
parent 24a6284fcd
commit 121abd0599
No known key found for this signature in database
GPG key ID: 6757AB26F72F0084
20 changed files with 92 additions and 94 deletions

View file

@ -1955,17 +1955,17 @@ impl<'a> Parser<'a> {
/// Like `parse_path`, but also supports parsing `Word` meta items into paths for back-compat.
/// This is used when parsing derive macro paths in `#[derive]` attributes.
pub fn parse_path_allowing_meta(&mut self, style: PathStyle) -> PResult<'a, ast::Path> {
let meta_name = match self.token {
let meta_ident = match self.token {
token::Interpolated(ref nt) => match nt.0 {
token::NtMeta(ref meta) => match meta.node {
ast::MetaItemKind::Word => Some(meta.name.clone()),
ast::MetaItemKind::Word => Some(meta.ident.clone()),
_ => None,
},
_ => None,
},
_ => None,
};
if let Some(path) = meta_name {
if let Some(path) = meta_ident {
self.bump();
return Ok(path);
}