Skip to content

Commit 2272726

Browse files
committed
Remove validation.
1 parent e7a9937 commit 2272726

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
@@ -451,7 +451,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
451451
if self.body.coroutine.is_none() {
452452
self.fail(location, "`Yield` cannot appear outside coroutine bodies");
453453
}
454-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
454+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
455455
self.fail(location, "`Yield` should have been replaced by coroutine lowering");
456456
}
457457
self.check_edge(location, *resume, EdgeKind::Normal);
@@ -489,7 +489,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CfgChecker<'a, 'tcx> {
489489
if self.body.coroutine.is_none() {
490490
self.fail(location, "`CoroutineDrop` cannot appear outside coroutine bodies");
491491
}
492-
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Initial) {
492+
if self.body.phase >= MirPhase::Runtime(RuntimePhase::Optimized) {
493493
self.fail(
494494
location,
495495
"`CoroutineDrop` should have been replaced by coroutine lowering",

0 commit comments

Comments
 (0)