]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_build/src/thir/mod.rs
Remove THIR::ExprKind::SelfRef
[rust.git] / compiler / rustc_mir_build / src / thir / mod.rs
index f2a2ef0d8f2bcf5ae8d44ea4eabc05f13c53fdf8..1a901746d5086e971def252630d15dacd845a8d5 100644 (file)
     VarRef {
         id: hir::HirId,
     },
-    /// first argument, used for self in a closure
-    SelfRef,
+    /// Used to represent upvars mentioned in a closure/generator
+    UpvarRef {
+        /// DefId of the closure/generator
+        closure_def_id: DefId,
+
+        /// HirId of the root variable
+        var_hir_id: hir::HirId,
+    },
     Borrow {
         borrow_kind: BorrowKind,
         arg: ExprRef<'tcx>,