add comment and test: we do not do value-based reasoning for promotion of unions
This commit is contained in:
parent
4cdd20584c
commit
d9a2886ef8
3 changed files with 46 additions and 25 deletions
|
@ -284,6 +284,7 @@ where
|
|||
if Q::in_adt_inherently(cx, def, args) {
|
||||
return true;
|
||||
}
|
||||
// Don't do any value-based reasoning for unions.
|
||||
if def.is_union() && Q::in_any_value_of_ty(cx, rvalue.ty(cx.body, cx.tcx)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue