diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-11-11 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-11-12 19:52:03 +0100 |
| commit | 9bb3d6b7d472e2116312ea45db07a5338af205fb (patch) | |
| tree | 97f4b02ab1e20d7fe75c0545a5ab47557e19a426 | |
| parent | ae4332643de6a672ab3aefd62a3063c9af21166c (diff) | |
Remove check for impossible condition
The callee body is already transformed; the condition is always false.
| -rw-r--r-- | compiler/rustc_mir/src/transform/inline.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_mir/src/transform/inline.rs b/compiler/rustc_mir/src/transform/inline.rs index 5023e49df3a..0d6d9e397ac 100644 --- a/compiler/rustc_mir/src/transform/inline.rs +++ b/compiler/rustc_mir/src/transform/inline.rs @@ -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; |
