diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-07-31 12:32:32 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-07-31 14:47:06 +1000 |
| commit | d72fc5ce445c9a84dc289334b8aa7b34a144619b (patch) | |
| tree | eb48d05139e0ba479bd078418eea13f4778040ac | |
| parent | ff7d5ba65e94980fbfb13793ef5d503ffad559b0 (diff) | |
| download | rust-d72fc5ce445c9a84dc289334b8aa7b34a144619b.tar.gz rust-d72fc5ce445c9a84dc289334b8aa7b34a144619b.zip | |
Remove `TokenTreeCursor::replace_prev_and_rewind`.
It's no longer used.
| -rw-r--r-- | compiler/rustc_ast/src/tokenstream.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/rustc_ast/src/tokenstream.rs b/compiler/rustc_ast/src/tokenstream.rs index 50b4e68a1bd..e9591c7c8db 100644 --- a/compiler/rustc_ast/src/tokenstream.rs +++ b/compiler/rustc_ast/src/tokenstream.rs @@ -714,15 +714,6 @@ impl TokenTreeCursor { pub fn look_ahead(&self, n: usize) -> Option<&TokenTree> { self.stream.0.get(self.index + n) } - - // Replace the previously obtained token tree with `tts`, and rewind to - // just before them. - pub fn replace_prev_and_rewind(&mut self, tts: Vec<TokenTree>) { - assert!(self.index > 0); - self.index -= 1; - let stream = Lrc::make_mut(&mut self.stream.0); - stream.splice(self.index..self.index + 1, tts); - } } #[derive(Debug, Copy, Clone, PartialEq, Encodable, Decodable, HashStable_Generic)] |
