diff options
| author | bors <bors@rust-lang.org> | 2018-12-24 07:26:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-24 07:26:19 +0000 |
| commit | 94bf2c15eb3d072e92855a605783a29920df9e46 (patch) | |
| tree | c54866741b6c39b4ddce1f30ae136075ec936bc5 /src/libsyntax/parse | |
| parent | e16928082aa2d66a4498132572b69156b94b25f1 (diff) | |
| parent | dff3e41914905eae0326c00de0dd9befc9d9ae83 (diff) | |
| download | rust-94bf2c15eb3d072e92855a605783a29920df9e46.tar.gz rust-94bf2c15eb3d072e92855a605783a29920df9e46.zip | |
Auto merge of #57087 - Centril:rollup, r=Centril
Rollup of 14 pull requests Successful merges: - #56188 (enum type instead of variant suggestion unification ) - #56342 (Improve docs for collecting into `Option`s) - #56916 (Fix mutable references in `static mut`) - #56917 (Simplify MIR generation for logical operations) - #56939 (Pin stabilization) - #56953 (Mark tuple structs as live if their constructors are used) - #56964 (Remove `TokenStream::JointTree`.) - #56966 (Correct strings for raw pointer deref and array access suggestions) - #57020 (Point to cause of `fn` expected return type) - #57032 (fix deprecation warnings in liballoc benches) - #57053 (Fix alignment for array indexing) - #57062 (Fix a comment) - #57067 (Stabilize min_const_unsafe_fn in 1.33) - #57078 (Ignore two tests on s390x) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/tokentrees.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/tokentrees.rs b/src/libsyntax/parse/lexer/tokentrees.rs index 6f9dc247a78..265ff5f57e4 100644 --- a/src/libsyntax/parse/lexer/tokentrees.rs +++ b/src/libsyntax/parse/lexer/tokentrees.rs @@ -11,7 +11,7 @@ use print::pprust::token_to_string; use parse::lexer::StringReader; use parse::{token, PResult}; -use tokenstream::{DelimSpan, TokenStream, TokenTree}; +use tokenstream::{DelimSpan, IsJoint::*, TokenStream, TokenTree}; impl<'a> StringReader<'a> { // Parse a stream of tokens into a list of `TokenTree`s, up to an `Eof`. @@ -186,8 +186,7 @@ impl<'a> StringReader<'a> { let raw = self.span_src_raw; self.real_token(); let is_joint = raw.hi() == self.span_src_raw.lo() && token::is_op(&self.token); - - Ok(if is_joint { tt.joint() } else { tt.into() }) + Ok(TokenStream::Tree(tt, if is_joint { Joint } else { NonJoint })) } } } |
