Skip to content

Commit f0bca06

Browse files
committed
Remove validation.
1 parent 93691b4 commit f0bca06

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

0 commit comments

Comments
 (0)