rust/compiler/rustc_parse/src
Michael Howell 14b27cfd11
Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011
Manually cleanup token stream when macro expansion aborts.

In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE.

In this case, this PR manually cleans up the token stream by closing all currently open delimiters.

Fixes https://github.com/rust-lang/rust/issues/96818.
Fixes https://github.com/rust-lang/rust/issues/80447.
Fixes https://github.com/rust-lang/rust/issues/81920.
Fixes https://github.com/rust-lang/rust/issues/91023.
2022-09-20 10:12:56 -07:00
..
lexer Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
parser Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011 2022-09-20 10:12:56 -07:00
lib.rs Only enable the let_else feature on bootstrap 2022-09-15 21:06:45 +02:00
validate_attr.rs Overhaul MacArgs::Eq. 2022-05-05 07:06:12 +10:00