Forbid RetagKind::TwoPhase
as well
This commit is contained in:
parent
cb2c7bb833
commit
7c4c620475
2 changed files with 3 additions and 4 deletions
|
@ -671,8 +671,8 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
|
||||||
// FIXME(JakobDegen) The validator should check that `self.mir_phase <
|
// FIXME(JakobDegen) The validator should check that `self.mir_phase <
|
||||||
// DropsLowered`. However, this causes ICEs with generation of drop shims, which
|
// DropsLowered`. However, this causes ICEs with generation of drop shims, which
|
||||||
// seem to fail to set their `MirPhase` correctly.
|
// seem to fail to set their `MirPhase` correctly.
|
||||||
if *kind == RetagKind::Raw {
|
if *kind == RetagKind::Raw || *kind == RetagKind::TwoPhase {
|
||||||
self.fail(location, "explicit `RetagKind::Raw` is forbidden");
|
self.fail(location, format!("explicit `{:?}` is forbidden", kind));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatementKind::StorageLive(..)
|
StatementKind::StorageLive(..)
|
||||||
|
|
|
@ -323,8 +323,7 @@ pub enum StatementKind<'tcx> {
|
||||||
/// For code that is not specific to stacked borrows, you should consider retags to read and
|
/// For code that is not specific to stacked borrows, you should consider retags to read and
|
||||||
/// modify the place in an opaque way.
|
/// modify the place in an opaque way.
|
||||||
///
|
///
|
||||||
/// Explicit `RetagKind::Raw` is not permitted - it is implicit as a part of
|
/// Only `RetagKind::Default` and `RetagKind::FnEntry` are permitted.
|
||||||
/// `Rvalue::AddressOf`.
|
|
||||||
Retag(RetagKind, Box<Place<'tcx>>),
|
Retag(RetagKind, Box<Place<'tcx>>),
|
||||||
|
|
||||||
/// Encodes a user's type ascription. These need to be preserved
|
/// Encodes a user's type ascription. These need to be preserved
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue