]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #107813 - compiler-errors:bad-impl-trait-in-macro-is-ok, r=estebank
authorMichael Goulet <michael@errs.io>
Thu, 9 Feb 2023 04:01:26 +0000 (20:01 -0800)
committerGitHub <noreply@github.com>
Thu, 9 Feb 2023 04:01:26 +0000 (20:01 -0800)
Do not eagerly recover for bad `impl Trait` types in macros

Fixes #107796

cc #106712, ```@estebank``` and ```@Ezrashaw``` please make sure to use [`Parser::may_recover`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/parser/struct.Parser.html#method.may_recover) for all eager-token-consuming parser recoveries.

This also fixes a separate regression from #99915, that was introduced before we added `may_recover` though.


Trivial merge