ExprKind::SelfRef was used to express accessing `self` in
the desugared Closure/Generator struct when lowering captures in THIR.
Since we handle captures in MIR now, we don't need `ExprKind::Self`.
this.lower_closure_capture(block, capture_index, *upvar_id)
}
- ExprKind::SelfRef => block.and(PlaceBuilder::from(Local::new(1))),
ExprKind::VarRef { id } => {
let place_builder = if this.is_bound_var_in_guard(id) {
let index = this.var_local_id(id, RefWithinGuard);
| ExprKind::Deref { .. }
| ExprKind::Index { .. }
| ExprKind::VarRef { .. }
- | ExprKind::SelfRef
| ExprKind::UpvarRef { .. }
| ExprKind::Break { .. }
| ExprKind::Continue { .. }
ExprKind::Field { .. }
| ExprKind::Deref { .. }
| ExprKind::Index { .. }
- | ExprKind::SelfRef
| ExprKind::UpvarRef { .. }
| ExprKind::VarRef { .. }
| ExprKind::PlaceTypeAscription { .. }
// Avoid creating a temporary
ExprKind::VarRef { .. }
- | ExprKind::SelfRef
| ExprKind::UpvarRef { .. }
| ExprKind::PlaceTypeAscription { .. }
| ExprKind::ValueTypeAscription { .. } => {
/// HirId of the root variable
var_hir_id: hir::HirId,
},
- /// first argument, used for self in a closure
- SelfRef,
Borrow {
borrow_kind: BorrowKind,
arg: ExprRef<'tcx>,