Change:
Given the code we emit We should emit something closer to
Reopening to track the case.

Discussion:
if let Some(span) = self.def_span(def_id) { err.span_label(span, &format!("`{}` defined here", path_str)); } <del> err.span_label(span, format!("did you mean `{}( /* fields */ )`?", path_str)); </del> <ins> let fields = self.r.field_names.get(&def_id).map_or("/* fields */".to_string(), |fields| { vec!["_"; fields.len()].join(", ") }); err.span_suggestion( span, "use the tuple variant pattern syntax instead", format!("{}({})", path_str, fields), Applicability::HasPlaceholders, ); </ins> } (Res::SelfTy(..), _) if ns == ValueNS => { err.span_label(span, fallback_label);

|     -------- `E::Empty4` defined here ... LL |         E::Empty4 => () <del> |         ^^^^^^^^^ did you mean `E::Empty4( /* fields */ )`? </del> <ins> |         ^^^^^^^^^ help: use the tuple variant pattern syntax instead: `E::Empty4()` </ins> error[E0532]: expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5` --> $DIR/empty-struct-tuple-pat.rs:33:9 | LL |         XE::XEmpty5 => (), <del> |         ^^^^------- |         |   | |         |   help: a unit variant with a similar name exists: `XEmpty4` |         did you mean `XE::XEmpty5( /* fields */ )`? </del> <ins> |         ^^^^^^^^^^^ </ins> | ::: $DIR/auxiliary/empty-struct.rs:7:5 |

|     ------- similarly named unit variant `XEmpty4` defined here LL |     XEmpty5(), |     --------- `XE::XEmpty5` defined here <ins> | help: use the tuple variant pattern syntax instead | LL |         XE::XEmpty5(/* fields */) => (), |         ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a unit variant with a similar name exists | LL |         XE::XEmpty4 => (), |             ^^^^^^^ </ins> error: aborting due to 4 previous errors

|     --- similarly named unit variant `Baz` defined here ... LL |         Foo::Bar => {} <del> |         ^^^^^--- |         |    | |         |    help: a unit variant with a similar name exists: `Baz` |         did you mean `Foo::Bar( /* fields */ )`? </del> <ins> |         ^^^^^^^^ | help: use the tuple variant pattern syntax instead | LL |         Foo::Bar(_) => {} |         ^^^^^^^^^^^ help: a unit variant with a similar name exists | LL |         Foo::Baz => {} |              ^^^ </ins> error[E0532]: expected tuple struct or tuple variant, found unit struct `S` --> $DIR/issue-32004.rs:16:9

|     ---------- `MyEnum::Tuple` defined here ... LL |         MyEnum::Tuple => "", <del> |         ^^^^^^^^^^^^^ did you mean `MyEnum::Tuple( /* fields */ )`? </del> <ins> |         ^^^^^^^^^^^^^ help: use the tuple variant pattern syntax instead: `MyEnum::Tuple(_)` </ins> error[E0532]: expected unit struct, unit variant or constant, found struct variant `MyEnum::Struct` --> $DIR/issue-63983.rs:10:9

match x { Enum::Foo(a, b) => {} //~^ ERROR expected tuple struct or tuple variant, found struct variant `Enum::Foo` <del> Enum::Bar(a, b) => {} </del> <ins> Enum::Bar { a, b } => {} //~^ ERROR tuple variant `Enum::Bar` written as struct variant </ins> } }

LL |         Enum::Foo(a, b) => {} |         ^^^^^^^^^^^^^^^ help: use struct pattern syntax instead: `Enum::Foo { a, b }` <del> error: aborting due to 2 previous errors </del> <ins> error[E0769]: tuple variant `Enum::Bar` written as struct variant --> $DIR/recover-from-bad-variant.rs:12:9 | LL |         Enum::Bar { a, b } => {} |         ^^^^^^^^^^^^^^^^^^ help: use the tuple variant pattern syntax instead: `Enum::Bar(a, b)` error: aborting due to 3 previous errors </ins> <del> For more information about this error, try `rustc --explain E0532`. </del> <ins> Some errors have detailed explanations: E0532, E0769. For more information about an error, try `rustc --explain E0532`. </ins>