Skip to content

Commit 2cea40a

Browse files
committed
Remove validation.
1 parent cfb31e4 commit 2cea40a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_mir_transform/src/validate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
449449
if self.body.coroutine.is_none() {
450450
self.fail(location, "`Yield` cannot appear outside coroutine bodies");
451451
}
452-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
452+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
453453
self.fail(location, "`Yield` should have been replaced by coroutine lowering");
454454
}
455455
self.check_edge(location, *resume, EdgeKind::Normal);
@@ -487,7 +487,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
487487
if self.body.coroutine.is_none() {
488488
self.fail(location, "`CoroutineDrop` cannot appear outside coroutine bodies");
489489
}
490-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
490+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
491491
self.fail(
492492
location,
493493
"`CoroutineDrop` should have been replaced by coroutine lowering",

0 commit comments

Comments
 (0)