提交 5582b195 编写于 作者: O Oli Scherer

Only emit a discrimiant tag for enums

上级 c0e11918
......@@ -110,7 +110,7 @@ fn const_to_valtree_inner<'tcx>(
let variant = ecx.read_discriminant(&place.into()).unwrap().1;
branches(def.variants[variant].fields.len(), Some(variant))
branches(def.variants[variant].fields.len(), def.is_enum().then_some(variant))
}
ty::Never
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册