Replace Local::new(1) with CAPTURE_STRUCT_LOCAL
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user