1
Fork 0

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

@ -159,6 +159,7 @@ impl<'tcx> Cx<'tcx> {
Adjust::Borrow(AutoBorrow::RawPtr(mutability)) => {
ExprKind::AddressOf { mutability, arg: self.thir.exprs.push(expr) }
}
Adjust::DynStar => ExprKind::Cast { source: self.thir.exprs.push(expr) },
};
Expr { temp_lifetime, ty: adjustment.target, span, kind }