]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank
authorbors <bors@rust-lang.org>
Fri, 11 Nov 2022 02:07:52 +0000 (02:07 +0000)
committerbors <bors@rust-lang.org>
Fri, 11 Nov 2022 02:07:52 +0000 (02:07 +0000)
Recover wrong-cased keywords that start items

(_this pr was inspired by [this tweet](https://twitter.com/Azumanga/status/1552982326409367561)_)

r? `@estebank`

We've talked a bit about this recovery, but I just wanted to make sure that this is the right approach :)

For now I've only added the case insensitive recovery to `use`s, since most other items like `impl` blocks, modules, functions can start with multiple keywords which complicates the matter.

1  2 
compiler/rustc_ast/src/token.rs
compiler/rustc_parse/src/parser/expr.rs
compiler/rustc_parse/src/parser/item.rs
compiler/rustc_parse/src/parser/mod.rs
compiler/rustc_parse/src/parser/ty.rs

Simple merge
Simple merge