rust/src/test/ui/issues/issue-32086.stderr
Esteban Küber b26ddb8af3 Point at local similarly named element and tweak references to variants
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.
2019-10-27 11:50:43 -07:00

21 lines
695 B
Text

error[E0532]: expected tuple struct or tuple variant, found constant `C`
--> $DIR/issue-32086.rs:5:9
|
LL | struct S(u8);
| ------------- similarly named tuple struct `S` defined here
...
LL | let C(a) = S(11);
| ^ help: a tuple struct with a similar name exists: `S`
error[E0532]: expected tuple struct or tuple variant, found constant `C`
--> $DIR/issue-32086.rs:6:9
|
LL | struct S(u8);
| ------------- similarly named tuple struct `S` defined here
...
LL | let C(..) = S(11);
| ^ help: a tuple struct with a similar name exists: `S`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0532`.