mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
dead code
This commit is contained in:
parent
bfc263f1f9
commit
660cf34d8c
8 changed files with 9 additions and 70 deletions
|
@ -52,14 +52,10 @@ impl<'a> LexedStr<'a> {
|
|||
pub fn intersperse_trivia(
|
||||
&self,
|
||||
output: &crate::Output,
|
||||
synthetic_root: bool,
|
||||
sink: &mut dyn FnMut(StrStep),
|
||||
) -> bool {
|
||||
let mut builder = Builder { lexed: self, pos: 0, state: State::PendingEnter, sink };
|
||||
|
||||
if synthetic_root {
|
||||
builder.enter(SyntaxKind::SOURCE_FILE);
|
||||
}
|
||||
for event in output.iter() {
|
||||
match event {
|
||||
Step::Token { kind, n_input_tokens: n_raw_tokens } => {
|
||||
|
@ -73,9 +69,6 @@ impl<'a> LexedStr<'a> {
|
|||
}
|
||||
}
|
||||
}
|
||||
if synthetic_root {
|
||||
builder.exit();
|
||||
}
|
||||
|
||||
match mem::replace(&mut builder.state, State::Normal) {
|
||||
State::PendingExit => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue