From da261aa7310ac029bf5009bc89688b7870e21a98 Mon Sep 17 00:00:00 2001
From: David Wood <david.wood2@arm.com>
Date: Tue, 10 Dec 2024 12:07:20 +0000
Subject: [PATCH] inline: remove unnecessary promoted check

---
 compiler/rustc_mir_transform/src/inline.rs | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/compiler/rustc_mir_transform/src/inline.rs b/compiler/rustc_mir_transform/src/inline.rs
index 621dba06694f..6e02cc704feb 100644
--- a/compiler/rustc_mir_transform/src/inline.rs
+++ b/compiler/rustc_mir_transform/src/inline.rs
@@ -332,10 +332,6 @@ impl<'tcx> Inliner<'tcx> for NormalInliner<'tcx> {
     }
 
     fn check_caller_mir_body(&self, body: &Body<'tcx>) -> bool {
-        if body.source.promoted.is_some() {
-            return false;
-        }
-
         // Avoid inlining into coroutines, since their `optimized_mir` is used for layout computation,
         // which can create a cycle, even when no attempt is made to inline the function in the other
         // direction.