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/parse/parser.rs | |
| parent | 350a34f85c0ed53315a2114f0001cfea4fe116d9 (diff) | |
| download | rust-67ce3f458939e6fe073bca6128526cb23f0797ba.tar.gz rust-67ce3f458939e6fe073bca6128526cb23f0797ba.zip | |
syntax: Switch function parameter order in `TokenTree::token`
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 57a49d1524d..e9e908eb858 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -362,11 +362,11 @@ impl TokenCursor { delim_span, token::Bracket, [ - TokenTree::token(sp, token::Ident(sym::doc, false)), - TokenTree::token(sp, token::Eq), - TokenTree::token(sp, token::TokenKind::lit( + TokenTree::token(token::Ident(sym::doc, false), sp), + TokenTree::token(token::Eq, sp), + TokenTree::token(token::TokenKind::lit( token::StrRaw(num_of_hashes), Symbol::intern(&stripped), None - )), + ), sp), ] .iter().cloned().collect::<TokenStream>().into(), ); @@ -375,10 +375,10 @@ impl TokenCursor { delim_span, token::NoDelim, &if doc_comment_style(&name.as_str()) == AttrStyle::Inner { - [TokenTree::token(sp, token::Pound), TokenTree::token(sp, token::Not), body] + [TokenTree::token(token::Pound, sp), TokenTree::token(token::Not, sp), body] .iter().cloned().collect::<TokenStream>().into() } else { - [TokenTree::token(sp, token::Pound), body] + [TokenTree::token(token::Pound, sp), body] .iter().cloned().collect::<TokenStream>().into() }, ))); @@ -4344,7 +4344,7 @@ impl<'a> Parser<'a> { }; TokenStream::new(vec![ args.into(), - TokenTree::token(token_lo.to(self.prev_span), token::FatArrow).into(), + TokenTree::token(token::FatArrow, token_lo.to(self.prev_span)).into(), body.into(), ]) } else { |
