deriv(Hash) for single-variant enum should not hash discriminant
Fixes #39137
This commit is contained in:
@@ -60,7 +60,7 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span, substr: &Substructure) -> P<E
|
||||
// based on the "shape".
|
||||
let (ident, is_struct) = match *substr.fields {
|
||||
Struct(vdata, _) => (substr.type_ident, vdata.is_struct()),
|
||||
EnumMatching(_, v, _) => (v.node.name, v.node.data.is_struct()),
|
||||
EnumMatching(_, _, v, _) => (v.node.name, v.node.data.is_struct()),
|
||||
EnumNonMatchingCollapsed(..) |
|
||||
StaticStruct(..) |
|
||||
StaticEnum(..) => cx.span_bug(span, "nonsensical .fields in `#[derive(Debug)]`"),
|
||||
|
||||
Reference in New Issue
Block a user