]> git.lizzy.rs Git - rust.git/commit
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)
commit5b82ea74b705799665b5a676b162f30d26f5108c
treecc33383afaa05322b5afac097aa27d0ad0236001
parentc1a859b25a95999ba276075bbd8e284ea675b41a
parentd86f9cd4640c9ad81ad4aec45c358d1931d40f30
Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank

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.
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