Skip to content

Commit 9bb3d6b

Browse files
committed
Remove check for impossible condition
The callee body is already transformed; the condition is always false.
1 parent ae43326 commit 9bb3d6b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

compiler/rustc_mir/src/transform/inline.rs

-6
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@ impl Inliner<'tcx> {
203203
debug!("should_inline({:?})", callsite);
204204
let tcx = self.tcx;
205205

206-
// Cannot inline generators which haven't been transformed yet
207-
if callee_body.yield_ty.is_some() {
208-
debug!(" yield ty present - not inlining");
209-
return false;
210-
}
211-
212206
let codegen_fn_attrs = tcx.codegen_fn_attrs(callsite.callee.def_id());
213207

214208
let self_features = &self.codegen_fn_attrs.target_features;

0 commit comments

Comments
 (0)