Skip to content

Commit

Permalink
Remove check for impossible condition
Browse files Browse the repository at this point in the history
The callee body is already transformed; the condition is always false.
  • Loading branch information
tmiasko committed Nov 12, 2020
1 parent ae43326 commit 9bb3d6b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions compiler/rustc_mir/src/transform/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@ impl Inliner<'tcx> {
debug!("should_inline({:?})", callsite);
let tcx = self.tcx;

// Cannot inline generators which haven't been transformed yet
if callee_body.yield_ty.is_some() {
debug!(" yield ty present - not inlining");
return false;
}

let codegen_fn_attrs = tcx.codegen_fn_attrs(callsite.callee.def_id());

let self_features = &self.codegen_fn_attrs.target_features;
Expand Down

0 comments on commit 9bb3d6b

Please sign in to comment.