mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
8c5e10bb11
Parse ident with allowing recovery when trying to diagnose Fixes rust-lang/rust#151238 rust-lang/rust#146978 made parsing ident not always allowed-recovery ([change](https://github.com/rust-lang/rust/pull/146978/changes#diff-ef8d6186dc7fb1d03a71446d0c9e6cc9e72158ec6896703dcf05686ee7dc83fcL469-R469)), so when matching macro with `NoopTracker`, which has `Recovery::Forbidden`, ICE happens when trying to parse kw as ident and then unwraping it. This PR introduces a new method for parsing ident with allowing recovery when trying to diagnose. Then errors will behave like previous. r? @petrochenkov