Skip to content

Commit

Permalink
inline: remove unnecessary promoted check
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtwco committed Dec 12, 2024
1 parent f7640c9 commit da261aa
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions compiler/rustc_mir_transform/src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit da261aa

Please sign in to comment.