Skip to content

Commit d72fc5c

Browse files
committed
Remove TokenTreeCursor::replace_prev_and_rewind.
It's no longer used.
1 parent ff7d5ba commit d72fc5c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler/rustc_ast/src/tokenstream.rs

-9
Original file line numberDiff line numberDiff line change
@@ -714,15 +714,6 @@ impl TokenTreeCursor {
714714
pub fn look_ahead(&self, n: usize) -> Option<&TokenTree> {
715715
self.stream.0.get(self.index + n)
716716
}
717-
718-
// Replace the previously obtained token tree with `tts`, and rewind to
719-
// just before them.
720-
pub fn replace_prev_and_rewind(&mut self, tts: Vec<TokenTree>) {
721-
assert!(self.index > 0);
722-
self.index -= 1;
723-
let stream = Lrc::make_mut(&mut self.stream.0);
724-
stream.splice(self.index..self.index + 1, tts);
725-
}
726717
}
727718

728719
#[derive(Debug, Copy, Clone, PartialEq, Encodable, Decodable, HashStable_Generic)]

0 commit comments

Comments
 (0)