Lowers a thunk (lazy computation) to a MIR body. Thunks have no parameters or captures, making them the simplest construct to lower.
(self, hir: HirPtr, binder: Binder<'heap>, thunk: Thunk<'heap>)
| 328 | /// Thunks have no parameters or captures, making them the simplest |
| 329 | /// construct to lower. |
| 330 | fn lower_thunk(self, hir: HirPtr, binder: Binder<'heap>, thunk: Thunk<'heap>) -> DefId { |
| 331 | let r#type = unwrap_closure_type( |
| 332 | self.context.hir.map.monomorphized_type_id(hir.id), |
| 333 | self.context.mir.env, |
| 334 | ); |
| 335 | |
| 336 | self.lower_impl( |
| 337 | Source::Thunk(hir.id, Some(binder)), |
| 338 | hir.span, |
| 339 | [] as [_; 0], |
| 340 | r#type.returns, |
| 341 | None, |
| 342 | |this, block| this.transform_body(block, thunk.body), |
| 343 | ) |
| 344 | } |
| 345 | |
| 346 | /// Lowers a type constructor to a MIR body. |
| 347 | /// |
no test coverage detected