Remove Cursor::append.
It's a weird function: it lets you modify the token stream in the middle of iteration. There is only one call site, and it is only used for the rare `ProceduralMasquerade` legacy case.
This commit is contained in:
@@ -522,10 +522,10 @@ impl server::TokenStream for Rustc<'_, '_> {
|
||||
// FIXME: It needs to be removed, but there are some
|
||||
// compatibility issues (see #73345).
|
||||
if group.flatten {
|
||||
cursor.append(group.stream);
|
||||
continue;
|
||||
tts.append(&mut self.into_trees(group.stream));
|
||||
} else {
|
||||
tts.push(TokenTree::Group(group));
|
||||
}
|
||||
tts.push(TokenTree::Group(group));
|
||||
}
|
||||
Some(tt) => tts.push(tt),
|
||||
None => return tts,
|
||||
|
||||
Reference in New Issue
Block a user