Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
30 lines
877 B
Text
30 lines
877 B
Text
error[E0412]: cannot find type `B` in this scope
|
|
--> $DIR/ui-testing-optout.rs:4:10
|
|
|
|
|
4 | type A = B;
|
|
| ---------^-
|
|
| | |
|
|
| | help: a type alias with a similar name exists: `A`
|
|
| similarly named type alias `A` defined here
|
|
|
|
error[E0412]: cannot find type `D` in this scope
|
|
--> $DIR/ui-testing-optout.rs:10:10
|
|
|
|
|
4 | type A = B;
|
|
| ----------- similarly named type alias `A` defined here
|
|
...
|
|
10 | type C = D;
|
|
| ^ help: a type alias with a similar name exists: `A`
|
|
|
|
error[E0412]: cannot find type `F` in this scope
|
|
--> $DIR/ui-testing-optout.rs:95:10
|
|
|
|
|
4 | type A = B;
|
|
| ----------- similarly named type alias `A` defined here
|
|
...
|
|
95 | type E = F;
|
|
| ^ help: a type alias with a similar name exists: `A`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0412`.
|