about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-29 14:33:53 +0100
committerGitHub <noreply@github.com>2024-02-29 14:33:53 +0100
commit8a74df9c22f717f5ec931f979fa5cdef106f6085 (patch)
treed2de301807b2cb00a0dd1df775977fc2cff83ca2 /compiler/rustc_interface/src
parent7147112c8c2065010d315705ab5ac7a7cc10e81a (diff)
parent451fd9815393b1b1ed8f28f27929645b31550a3f (diff)
downloadrust-8a74df9c22f717f5ec931f979fa5cdef106f6085.tar.gz
rust-8a74df9c22f717f5ec931f979fa5cdef106f6085.zip
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
```
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions