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 d33d2f0 + 1738038 commit d9df3c5
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit d9df3c5

Please sign in to comment.