Begin to implement type system layer of unsafe binders
This commit is contained in:
parent
54a396a9bd
commit
4d735d831e
2 changed files with 5 additions and 2 deletions
|
@ -877,7 +877,8 @@ impl TyCoercionStability {
|
|||
| ty::CoroutineClosure(..)
|
||||
| ty::Never
|
||||
| ty::Tuple(_)
|
||||
| ty::Alias(ty::Projection, _) => Self::Deref,
|
||||
| ty::Alias(ty::Projection, _)
|
||||
| ty::UnsafeBinder(_) => Self::Deref,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -677,6 +677,9 @@ pub fn for_each_unconsumed_temporary<'tcx, B>(
|
|||
ExprKind::Type(e, _) => {
|
||||
helper(typeck, consume, e, f)?;
|
||||
},
|
||||
ExprKind::UnsafeBinderCast(_, e, _) => {
|
||||
helper(typeck, consume, e, f)?;
|
||||
},
|
||||
|
||||
// Either drops temporaries, jumps out of the current expression, or has no sub expression.
|
||||
ExprKind::DropTemps(_)
|
||||
|
@ -694,7 +697,6 @@ pub fn for_each_unconsumed_temporary<'tcx, B>(
|
|||
| ExprKind::Continue(_)
|
||||
| ExprKind::InlineAsm(_)
|
||||
| ExprKind::OffsetOf(..)
|
||||
| ExprKind::UnsafeBinderCast(..)
|
||||
| ExprKind::Err(_) => (),
|
||||
}
|
||||
ControlFlow::Continue(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue