diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-05 13:25:26 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-06 14:04:02 +0300 |
| commit | 67ce3f458939e6fe073bca6128526cb23f0797ba (patch) | |
| tree | f75ff347f2fe08e2bbe42b4455dd9a08bb858619 /src/libsyntax/attr | |
| parent | 350a34f85c0ed53315a2114f0001cfea4fe116d9 (diff) | |
| download | rust-67ce3f458939e6fe073bca6128526cb23f0797ba.tar.gz rust-67ce3f458939e6fe073bca6128526cb23f0797ba.zip | |
syntax: Switch function parameter order in `TokenTree::token`
Diffstat (limited to 'src/libsyntax/attr')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index cc16bac320d..8c9bed57bfd 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -465,10 +465,10 @@ impl MetaItem { let mod_sep_span = Span::new(last_pos, segment.ident.span.lo(), segment.ident.span.ctxt()); - idents.push(TokenTree::token(mod_sep_span, token::ModSep).into()); + idents.push(TokenTree::token(token::ModSep, mod_sep_span).into()); } - idents.push(TokenTree::token(segment.ident.span, - TokenKind::from_ast_ident(segment.ident)).into()); + idents.push(TokenTree::token(TokenKind::from_ast_ident(segment.ident), + segment.ident.span).into()); last_pos = segment.ident.span.hi(); } self.node.tokens(self.span).append_to_tree_and_joint_vec(&mut idents); @@ -532,7 +532,7 @@ impl MetaItemKind { match *self { MetaItemKind::Word => TokenStream::empty(), MetaItemKind::NameValue(ref lit) => { - let mut vec = vec![TokenTree::token(span, token::Eq).into()]; + let mut vec = vec![TokenTree::token(token::Eq, span).into()]; lit.tokens().append_to_tree_and_joint_vec(&mut vec); TokenStream::new(vec) } @@ -540,7 +540,7 @@ impl MetaItemKind { let mut tokens = Vec::new(); for (i, item) in list.iter().enumerate() { if i > 0 { - tokens.push(TokenTree::token(span, token::Comma).into()); + tokens.push(TokenTree::token(token::Comma, span).into()); } item.tokens().append_to_tree_and_joint_vec(&mut tokens); } |
