]> 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 4d57fd5c64f8dd1738801e4b52dac9779aae7c91..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>,
     Return {
         value: Option<ExprRef<'tcx>>,
     },
+    ConstBlock {
+        value: &'tcx Const<'tcx>,
+    },
     Repeat {
         value: ExprRef<'tcx>,
         count: &'tcx Const<'tcx>,