diff options
| author | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-03 11:52:03 +0000 |
| commit | d68b0eceaaf719a4702ab13a7ca62dea5d966082 (patch) | |
| tree | c7a351327d19c398532f139444d4cc652070318d /src/libsyntax/parse/parser.rs | |
| parent | 698b956a9fca9688632d617dd6d73cae834237a3 (diff) | |
| parent | 84f450866041e0269875acb1350920308cdc109f (diff) | |
| download | rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.tar.gz rust-d68b0eceaaf719a4702ab13a7ca62dea5d966082.zip | |
Auto merge of #50030 - flip1995:rfc2103, r=petrochenkov
Implement tool_attributes feature (RFC 2103) cc #44690 This is currently just a rebased and compiling (hopefully) version of #47773. Let's see if travis likes this. I will add the implementation for `tool_lints` this week.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 324cadc84e8..0e3bced3222 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1958,16 +1958,16 @@ impl<'a> Parser<'a> { 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.ident), + ast::MetaItemKind::Word => Some(meta.ident.clone()), _ => None, }, _ => None, }, _ => None, }; - if let Some(ident) = meta_ident { + if let Some(path) = meta_ident { self.bump(); - return Ok(ast::Path::from_ident(ident)); + return Ok(path); } self.parse_path(style) } |
