From 698acc645e08078edfe70ad8651c0874a7933052 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 24 Apr 2023 18:17:24 -0300 Subject: [PATCH] Add GeneratorDrop terminator to SMIR --- compiler/rustc_smir/src/rustc_smir/mod.rs | 2 +- compiler/rustc_smir/src/stable_mir/mir/body.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs index efbb3b321d5a7..241cd182059ba 100644 --- a/compiler/rustc_smir/src/rustc_smir/mod.rs +++ b/compiler/rustc_smir/src/rustc_smir/mod.rs @@ -282,7 +282,7 @@ fn rustc_terminator_to_terminator( unwind: rustc_unwind_to_unwind(unwind), }, Yield { .. } => todo!(), - GeneratorDrop => todo!(), + GeneratorDrop => Terminator::GeneratorDrop, FalseEdge { .. } => todo!(), FalseUnwind { .. } => todo!(), InlineAsm { .. } => todo!(), diff --git a/compiler/rustc_smir/src/stable_mir/mir/body.rs b/compiler/rustc_smir/src/stable_mir/mir/body.rs index 699c945738103..4baf3f1f75eac 100644 --- a/compiler/rustc_smir/src/stable_mir/mir/body.rs +++ b/compiler/rustc_smir/src/stable_mir/mir/body.rs @@ -42,6 +42,7 @@ pub enum Terminator { target: usize, unwind: UnwindAction, }, + GeneratorDrop, } #[derive(Clone, Debug)]