about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/mbe.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-04-11 10:55:49 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-04-14 09:01:23 +1000
commit75fd391aaa3e21c7a1e9403f20eacf23c32aa7c7 (patch)
tree7a73e84c3cba078c905047943b491b731638570e /compiler/rustc_expand/src/mbe.rs
parent2657d8f7b3bbdebb7c6428b8d08279504fbfbc3f (diff)
downloadrust-75fd391aaa3e21c7a1e9403f20eacf23c32aa7c7.tar.gz
rust-75fd391aaa3e21c7a1e9403f20eacf23c32aa7c7.zip
Introduce `TtHandle` and use it in `TokenSet`.
This removes the last use of `<mbe::TokenTree as Clone>`. It also
removes two trivial methods on `Delimited`.
Diffstat (limited to 'compiler/rustc_expand/src/mbe.rs')
-rw-r--r--compiler/rustc_expand/src/mbe.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_expand/src/mbe.rs b/compiler/rustc_expand/src/mbe.rs
index f78f8460dcf..845d1ff5b51 100644
--- a/compiler/rustc_expand/src/mbe.rs
+++ b/compiler/rustc_expand/src/mbe.rs
@@ -26,18 +26,6 @@ struct Delimited {
     tts: Vec<TokenTree>,
 }
 
-impl Delimited {
-    /// Returns a `self::TokenTree` with a `Span` corresponding to the opening delimiter.
-    fn open_tt(&self, span: DelimSpan) -> TokenTree {
-        TokenTree::token(token::OpenDelim(self.delim), span.open)
-    }
-
-    /// Returns a `self::TokenTree` with a `Span` corresponding to the closing delimiter.
-    fn close_tt(&self, span: DelimSpan) -> TokenTree {
-        TokenTree::token(token::CloseDelim(self.delim), span.close)
-    }
-}
-
 #[derive(PartialEq, Encodable, Decodable, Debug)]
 struct SequenceRepetition {
     /// The sequence of token trees