diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-09-06 03:56:45 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-09-07 16:29:04 +0100 |
| commit | 49d2fd1725510fd3bf6f2937e178b1aa055ddb02 (patch) | |
| tree | a04455dea49b29d2c981573bd920116f0418024b /src/libsyntax/tokenstream.rs | |
| parent | ef54f57c5b9d894a38179d09b00610c1b337b086 (diff) | |
| download | rust-49d2fd1725510fd3bf6f2937e178b1aa055ddb02.tar.gz rust-49d2fd1725510fd3bf6f2937e178b1aa055ddb02.zip | |
Aggregation of cosmetic changes made during work on REPL PRs: libsyntax
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index 48055358619..d702038f54e 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -6,7 +6,7 @@ //! //! ## Ownership //! -//! `TokenStreams` are persistent data structures constructed as ropes with reference +//! `TokenStream`s are persistent data structures constructed as ropes with reference //! counted-children. In general, this means that calling an operation on a `TokenStream` //! (such as `slice`) produces an entirely new `TokenStream` from the borrowed reference to //! the original. This essentially coerces `TokenStream`s into 'views' of their subparts, @@ -147,9 +147,8 @@ impl TokenTree { } } -/// # Token Streams -/// /// A `TokenStream` is an abstract sequence of tokens, organized into `TokenTree`s. +/// /// The goal is for procedural macros to work with `TokenStream`s and `TokenTree`s /// instead of a representation of the abstract syntax tree. /// Today's `TokenTree`s can still contain AST via `token::Interpolated` for back-compat. @@ -304,7 +303,7 @@ impl TokenStream { Cursor::new(self) } - /// Compares two TokenStreams, checking equality without regarding span information. + /// Compares two `TokenStream`s, checking equality without regarding span information. pub fn eq_unspanned(&self, other: &TokenStream) -> bool { let mut t1 = self.trees(); let mut t2 = other.trees(); |
