1
Fork 0

Replace Local::new(1) with CAPTURE_STRUCT_LOCAL

This commit is contained in:
Paul Trojahn 2021-05-21 21:01:27 +02:00
parent 3e827cc21e
commit 0a80cc4d83
6 changed files with 20 additions and 19 deletions

View file

@ -1,7 +1,7 @@
use crate::hir::place::{
Place as HirPlace, PlaceBase as HirPlaceBase, ProjectionKind as HirProjectionKind,
};
use crate::ty;
use crate::{mir, ty};
use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
use rustc_hir as hir;
@ -12,6 +12,10 @@ use super::{Ty, TyCtxt};
use self::BorrowKind::*;
// Captures are represented using fields inside a structure.
// This represents accessing self in the closure structure
pub const CAPTURE_STRUCT_LOCAL: mir::Local = mir::Local::from_u32(1);
#[derive(
Clone,
Copy,