Skip to content

Commit 5135d94

Browse files
committed
Remove validation.
1 parent 1a79c49 commit 5135d94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_mir_transform/src/validate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
455455
if self.body.coroutine.is_none() {
456456
self.fail(location, "`Yield` cannot appear outside coroutine bodies");
457457
}
458-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
458+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
459459
self.fail(location, "`Yield` should have been replaced by coroutine lowering");
460460
}
461461
self.check_edge(location, *resume, EdgeKind::Normal);
@@ -493,7 +493,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
493493
if self.body.coroutine.is_none() {
494494
self.fail(location, "`CoroutineDrop` cannot appear outside coroutine bodies");
495495
}
496-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
496+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
497497
self.fail(
498498
location,
499499
"`CoroutineDrop` should have been replaced by coroutine lowering",

0 commit comments

Comments
 (0)