Skip to content

Commit 55982c2

Browse files
committed
Don't actually use the attached tokens for now
This fails to bootstrap, since we completely ignore `#[cfg]` and other attributes/macros
1 parent 025591f commit 55982c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_parse/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,13 @@ pub fn nt_to_tokenstream(nt: &Nonterminal, sess: &ParseSess, span: Span) -> Toke
321321
Some(tokenstream::TokenTree::token(token::Lifetime(ident.name), ident.span).into())
322322
}
323323
Nonterminal::NtTT(ref tt) => Some(tt.clone().into()),
324-
Nonterminal::NtLiteral(ref expr) | Nonterminal::NtExpr(ref expr) => expr.tokens.clone(),
324+
_ => None
325+
/*Nonterminal::NtLiteral(ref expr) | Nonterminal::NtExpr(ref expr) => expr.tokens.clone(),
325326
Nonterminal::NtTy(ref ty) => ty.tokens.clone(),
326327
Nonterminal::NtBlock(ref block) => block.tokens.clone(),
327328
Nonterminal::NtPat(ref pat) => pat.tokens.clone(),
328329
Nonterminal::NtStmt(ref stmt) => stmt.tokens.clone(),
329-
Nonterminal::NtMeta(_) | Nonterminal::NtPath(_) | Nonterminal::NtVis(_) => None,
330+
Nonterminal::NtMeta(_) | Nonterminal::NtPath(_) | Nonterminal::NtVis(_) => None,*/
330331
};
331332

332333
// FIXME(#43081): Avoid this pretty-print + reparse hack

0 commit comments

Comments
 (0)