Make dyn* cast into a coercion

This commit is contained in:
Michael Goulet 2022-09-14 23:20:03 +00:00
parent edabf59ca4
commit 76386bd65e
13 changed files with 73 additions and 68 deletions

View file

@ -1824,7 +1824,6 @@ impl<'tcx> Rvalue<'tcx> {
// While the model is undecided, we should be conservative. See
// <https://www.ralfj.de/blog/2022/04/11/provenance-exposed.html>
Rvalue::Cast(CastKind::PointerExposeAddress, _, _) => false,
Rvalue::Cast(CastKind::DynStar, _, _) => false,
Rvalue::Use(_)
| Rvalue::CopyForDeref(_)
@ -1841,7 +1840,8 @@ impl<'tcx> Rvalue<'tcx> {
| CastKind::FnPtrToPtr
| CastKind::PtrToPtr
| CastKind::Pointer(_)
| CastKind::PointerFromExposedAddress,
| CastKind::PointerFromExposedAddress
| CastKind::DynStar,
_,
_,
)