rust/compiler/rustc_resolve/src
Michael Goulet 54744601bf
Rollup merge of #100817 - vincenzopalazzo:macros/bool_spelling_sugg, r=davidtwco
sugg: suggest the usage of boolean value when there is a typo in the keyword

Fixes https://github.com/rust-lang/rust/issues/100686

This adds a new suggestion when there is a well-known typo

With the following program

```rust
fn main() {
    let x = True;
}
```

Now we have the following suggestion

```
error[E0425]: cannot find value `True` in this scope
 --> test.rs:2:13
  |
2 |     let x = True;
  |             ^^^^ not found in this scope
  |
help: you may want to use a bool value instead
  |
2 |     let x = true;
  |             ~~~~

error: aborting due to previous error
```

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-08-26 15:56:26 -07:00
..
diagnostics Implement the unused_macro_rules lint 2022-05-05 19:13:00 +02:00
late Rollup merge of #100817 - vincenzopalazzo:macros/bool_spelling_sugg, r=davidtwco 2022-08-26 15:56:26 -07:00
access_levels.rs Make ResolverAstLowering a struct. 2022-06-14 22:44:27 +02:00
build_reduced_graph.rs Unused tuple fields in rustc_resolve. 2022-07-25 19:45:26 +02:00
check_unused.rs Make ResolverAstLowering a struct. 2022-06-14 22:44:27 +02:00
def_collector.rs Parse closure binders 2022-07-12 16:25:16 +04:00
diagnostics.rs Mark suggestion as MaybeIncorrect. 2022-08-23 00:09:58 +02:00
ident.rs Remove FnItemRibKind. 2022-08-23 00:08:42 +02:00
imports.rs Update compiler/rustc_resolve/src/imports.rs 2022-08-15 20:51:32 +02:00
late.rs Remove FnItemRibKind. 2022-08-23 00:08:42 +02:00
lib.rs Improve local generic parameter suggestions. 2022-08-23 00:08:42 +02:00
macros.rs avoid embedding StabilityLevel::Unstable reason string into metadata multiple times 2022-07-21 22:53:02 +03:00