@@ -605,8 +605,6 @@ pub enum LocalKind {
605605
606606#[ derive( Clone , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
607607pub struct VarBindingForm < ' tcx > {
608- /// The `HirId` of the variable.
609- pub var_id : hir:: HirId ,
610608 /// Is variable bound via `x`, `mut x`, `ref x`, or `ref mut x`?
611609 pub binding_mode : ty:: BindingMode ,
612610 /// If an explicit type was provided for this variable binding,
@@ -656,7 +654,6 @@ pub enum ImplicitSelfKind {
656654CloneTypeFoldableAndLiftImpls ! { BindingForm <' tcx>, }
657655
658656impl_stable_hash_for ! ( struct self :: VarBindingForm <' tcx> {
659- var_id,
660657 binding_mode,
661658 opt_ty_info,
662659 opt_match_place,
@@ -877,7 +874,9 @@ impl<'tcx> LocalDecl<'tcx> {
877874 match self . is_user_variable {
878875 Some ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
879876 binding_mode : ty:: BindingMode :: BindByValue ( _) ,
880- ..
877+ opt_ty_info : _,
878+ opt_match_place : _,
879+ pat_span : _,
881880 } ) ) ) => true ,
882881
883882 Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( ImplicitSelfKind :: Imm ) ) ) => true ,
@@ -893,7 +892,9 @@ impl<'tcx> LocalDecl<'tcx> {
893892 match self . is_user_variable {
894893 Some ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
895894 binding_mode : ty:: BindingMode :: BindByValue ( _) ,
896- ..
895+ opt_ty_info : _,
896+ opt_match_place : _,
897+ pat_span : _,
897898 } ) ) ) => true ,
898899
899900 Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( _) ) ) => true ,
@@ -2830,7 +2831,7 @@ impl Location {
28302831#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , HashStable ) ]
28312832pub enum UnsafetyViolationKind {
28322833 General ,
2833- /// Permitted in const fns and regular fns .
2834+ /// Permitted both in ` const fn`s and regular `fn`s .
28342835 GeneralAndConstFn ,
28352836 ExternStatic ( hir:: HirId ) ,
28362837 BorrowPacked ( hir:: HirId ) ,
@@ -2848,7 +2849,7 @@ pub struct UnsafetyViolation {
28482849pub struct UnsafetyCheckResult {
28492850 /// Violations that are propagated *upwards* from this function.
28502851 pub violations : Lrc < [ UnsafetyViolation ] > ,
2851- /// Unsafe blocks in this function, along with whether they are used. This is
2852+ /// `unsafe` blocks in this function, along with whether they are used. This is
28522853 /// used for the "unused_unsafe" lint.
28532854 pub unsafe_blocks : Lrc < [ ( hir:: HirId , bool ) ] > ,
28542855}
@@ -2875,12 +2876,14 @@ pub struct GeneratorLayout<'tcx> {
28752876 /// layout.
28762877 pub storage_conflicts : BitMatrix < GeneratorSavedLocal , GeneratorSavedLocal > ,
28772878
2878- /// Names and scopes of all the stored generator locals.
2879+ /// The names and scopes of all the stored generator locals.
2880+ ///
2881+ /// N.B., this is *strictly* a temporary hack for codegen
2882+ /// debuginfo generation, and will be removed at some point.
2883+ /// Do **NOT** use it for anything else, local information should not be
2884+ /// in the MIR, please rely on local crate HIR or other side-channels.
28792885 //
2880- // NOTE(tmandry) This is *strictly* a temporary hack for codegen
2881- // debuginfo generation, and will be removed at some point.
2882- // Do **NOT** use it for anything else, local information should not be
2883- // in the MIR, please rely on local crate HIR or other side-channels.
2886+ // FIXME(tmandry): see above.
28842887 pub __local_debuginfo_codegen_only_do_not_use : IndexVec < GeneratorSavedLocal , LocalDecl < ' tcx > > ,
28852888}
28862889
0 commit comments