Rollup merge of #85605 - ptrojahn:closure_struct, r=matthewjasper
Replace Local::new(1) with CAPTURE_STRUCT_LOCAL
This commit is contained in:
commit
ad72247833
6 changed files with 20 additions and 19 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue