1
Fork 0

inline: remove unnecessary promoted check

This commit is contained in:
David Wood 2024-12-10 12:07:20 +00:00
parent e4bae91be1
commit 90066c0df3
No known key found for this signature in database

View file

@ -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.