Resolve projections during internal mutability analysis
This commit is contained in:
parent
d79f86255d
commit
58d4834097
4 changed files with 96 additions and 0 deletions
|
|
@ -215,6 +215,12 @@ impl<'tcx> NonCopyConst<'tcx> {
|
|||
.iter()
|
||||
.zip(tys)
|
||||
.any(|(field, ty)| Self::is_value_unfrozen_raw_inner(cx, *field, ty)),
|
||||
ty::Alias(ty::Projection, _) => match cx.tcx.try_normalize_erasing_regions(cx.typing_env(), ty) {
|
||||
Ok(normalized_ty) if ty != normalized_ty => {
|
||||
Self::is_value_unfrozen_raw_inner(cx, ty::ValTree::Branch(val), normalized_ty)
|
||||
},
|
||||
_ => false,
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue