diff options
| author | Alexander Regueiro <alexreg@me.com> | 2019-02-08 14:53:55 +0100 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-02-10 23:42:32 +0000 |
| commit | c3e182cf43aea2c010a1915eb37293a458df2228 (patch) | |
| tree | 225aa2dfceff56d10c0b31f6966fbf7ec5da8180 /src/libsyntax/tokenstream.rs | |
| parent | 0b7af2668a80fb2fa720a06ca44aff4dd1e9de38 (diff) | |
| download | rust-c3e182cf43aea2c010a1915eb37293a458df2228.tar.gz rust-c3e182cf43aea2c010a1915eb37293a458df2228.zip | |
rustc: doc comments
Diffstat (limited to 'src/libsyntax/tokenstream.rs')
| -rw-r--r-- | src/libsyntax/tokenstream.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/tokenstream.rs b/src/libsyntax/tokenstream.rs index b6e4d4cd976..c4f2cffb097 100644 --- a/src/libsyntax/tokenstream.rs +++ b/src/libsyntax/tokenstream.rs @@ -5,6 +5,7 @@ //! which are themselves a single `Token` or a `Delimited` subsequence of tokens. //! //! ## Ownership +//! //! `TokenStreams` 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 @@ -59,7 +60,7 @@ impl TokenTree { macro_parser::parse(cx.parse_sess(), tts, mtch, Some(directory), true) } - /// Check if this TokenTree is equal to the other, regardless of span information. + /// Checks if this TokenTree is equal to the other, regardless of span information. pub fn eq_unspanned(&self, other: &TokenTree) -> bool { match (self, other) { (&TokenTree::Token(_, ref tk), &TokenTree::Token(_, ref tk2)) => tk == tk2, @@ -89,7 +90,7 @@ impl TokenTree { } } - /// Retrieve the TokenTree's span. + /// Retrieves the TokenTree's span. pub fn span(&self) -> Span { match *self { TokenTree::Token(sp, _) => sp, |
