rust/compiler/rustc_resolve
Guillaume Gomez 8a74df9c22
Rollup merge of #121792 - GuillaumeGomez:improve-suggestion, r=michaelwoerister
Improve renaming suggestion when item starts with underscore

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

It goes from:

```terminal
error[E0433]: failed to resolve: use of undeclared type `Foo`
 --> src/foo.rs:6:13
  |
6 |     let _ = Foo::Bar;
  |             ^^^ use of undeclared type `Foo`
  |
help: an enum with a similar name exists, consider changing it
  |
1 | enum Foo {
  |      ~~~
```

to:

```terminal
error[E0433]: failed to resolve: use of undeclared type `Foo`
 --> foo.rs:6:13
  |
6 |     let _ = Foo::Bar;
  |             ^^^ use of undeclared type `Foo`
  |
help: an enum with a similar name exists, consider renaming `_Foo` into `Foo`
  |
1 | enum Foo {
  |      ~~~

error: aborting due to 1 previous error
```
2024-02-29 14:33:53 +01:00
..
src Rollup merge of #121792 - GuillaumeGomez:improve-suggestion, r=michaelwoerister 2024-02-29 14:33:53 +01:00
Cargo.toml Update pulldown-cmark version to 0.9.5 2024-01-29 14:14:03 +01:00
messages.ftl Rollup merge of #119939 - clubby789:static-const-generic-note, r=compiler-errors 2024-02-06 22:45:39 +01:00