Tweak ordering of suggestions

Modify logic to make it easier to follow and recover labels that would
otherwise be lost.
This commit is contained in:
Esteban Küber 2020-08-09 20:29:39 -07:00
parent 18f3be7704
commit eef284be59
13 changed files with 131 additions and 87 deletions

View file

@ -34,15 +34,18 @@ LL | struct Foo { a: bool };
LL |
LL | let f = Foo();
| ^^^^^
...
LL | fn foo() {
| -------- similarly named function `foo` defined here
|
help: a function with a similar name exists
|
LL | let f = foo();
| ^^^
help: use struct literal syntax instead
|
LL | let f = Foo { a: val };
| ^^^^^^^^^^^^^^
help: a function with a similar name exists
|
LL | let f = foo();
| ^^^
error[E0423]: expected value, found struct `T`
--> $DIR/E0423.rs:14:8