Make LazyAttrTokenStream::encode panic.

It's unreachable, because AST JSON printing support was removed some
time ago.
This commit is contained in:
Nicholas Nethercote 2024-04-24 10:46:43 +10:00
parent 1b3fba066c
commit 15e71b6e43

View File

@ -140,9 +140,8 @@ impl fmt::Debug for LazyAttrTokenStream {
}
impl<S: SpanEncoder> Encodable<S> for LazyAttrTokenStream {
fn encode(&self, s: &mut S) {
// Used by AST json printing.
Encodable::encode(&self.to_attr_token_stream(), s);
fn encode(&self, _s: &mut S) {
panic!("Attempted to encode LazyAttrTokenStream");
}
}