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.
This commit is contained in:
commit
5b82ea74b7
10 changed files with 286 additions and 42 deletions
6
compiler/rustc_ast/src/util/case.rs
Normal file
6
compiler/rustc_ast/src/util/case.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
/// Whatever to ignore case (`fn` vs `Fn` vs `FN`) or not. Used for recovering.
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum Case {
|
||||
Sensitive,
|
||||
Insensitive,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue