use type name in E0599 enum variant suggestion

Also, rename the variable from "type_str" to "item_kind" to avoid
the ambiguity that caused this bug.
This commit is contained in:
Andy Russell 2018-06-02 16:23:26 -04:00
parent 4ecf12bf0e
commit 9eb70c3cf5
No known key found for this signature in database
GPG key ID: BE2221033EDBC374
3 changed files with 8 additions and 8 deletions

View file

@ -6,7 +6,7 @@ LL | pub enum SomeEnum {
LL | B = SomeEnum::A,
| ^^^^^^^^^^^ variant not found in `SomeEnum`
|
= note: did you mean `variant::B`?
= note: did you mean `SomeEnum::B`?
error: aborting due to previous error

View file

@ -7,7 +7,7 @@ LL | enum Foo {
LL | Foo::Baz(..) => (),
| ^^^^^^^^^^^^ variant not found in `Foo`
|
= note: did you mean `variant::Bar`?
= note: did you mean `Foo::Bar`?
error: aborting due to previous error