Skip to content

Commit

Permalink
Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011
Browse files Browse the repository at this point in the history
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 rust-lang/rust#96818.
Fixes rust-lang/rust#80447.
Fixes rust-lang/rust#81920.
Fixes rust-lang/rust#91023.
  • Loading branch information
notriddle committed Sep 20, 2022
2 parents 49786b0 + f1adf7a commit f9988ea
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit f9988ea

Please sign in to comment.