We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0e1191 commit 5582b19Copy full SHA for 5582b19
compiler/rustc_mir/src/const_eval/mod.rs
@@ -110,7 +110,7 @@ fn const_to_valtree_inner<'tcx>(
110
111
let variant = ecx.read_discriminant(&place.into()).unwrap().1;
112
113
- branches(def.variants[variant].fields.len(), Some(variant))
+ branches(def.variants[variant].fields.len(), def.is_enum().then_some(variant))
114
}
115
116
ty::Never
0 commit comments