diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-24 06:40:35 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-11-06 23:01:02 +1100 |
| commit | 69bc4aba785e071740d2d46f109623b9951aae5d (patch) | |
| tree | c21cbc01c951ccece7ee9cbef03142811e8ccc78 /src/libsyntax/parse/mod.rs | |
| parent | e8b190ac4ad79e58d21ee1d573529ff74d8eedaa (diff) | |
| download | rust-69bc4aba785e071740d2d46f109623b9951aae5d.tar.gz rust-69bc4aba785e071740d2d46f109623b9951aae5d.zip | |
Remove unnecessary `Deref` impl for `Attribute`.
This kind of thing just makes the code harder to read.
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 6d8ecdf805b..6cfa0dfad82 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -287,7 +287,7 @@ pub fn parse_in_attr<'a, T>( ) -> PResult<'a, T> { let mut parser = Parser::new( sess, - attr.tokens.clone(), + attr.item.tokens.clone(), None, false, false, @@ -403,8 +403,8 @@ fn prepend_attrs( let mut brackets = tokenstream::TokenStreamBuilder::new(); // For simple paths, push the identifier directly - if attr.path.segments.len() == 1 && attr.path.segments[0].args.is_none() { - let ident = attr.path.segments[0].ident; + if attr.item.path.segments.len() == 1 && attr.item.path.segments[0].args.is_none() { + let ident = attr.item.path.segments[0].ident; let token = token::Ident(ident.name, ident.as_str().starts_with("r#")); brackets.push(tokenstream::TokenTree::token(token, ident.span)); @@ -415,7 +415,7 @@ fn prepend_attrs( brackets.push(stream); } - brackets.push(attr.tokens.clone()); + brackets.push(attr.item.tokens.clone()); // The span we list here for `#` and for `[ ... ]` are both wrong in // that it encompasses more than each token, but it hopefully is "good |
