1
Fork 0

Rollup merge of #85605 - ptrojahn:closure_struct, r=matthewjasper

Replace Local::new(1) with CAPTURE_STRUCT_LOCAL
This commit is contained in:
Guillaume Gomez 2021-05-25 13:05:14 +02:00 committed by GitHub
commit ad72247833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,