@@ -605,8 +605,6 @@ pub enum LocalKind {
605
605
606
606
#[ derive( Clone , PartialEq , Eq , Hash , Debug , RustcEncodable , RustcDecodable ) ]
607
607
pub struct VarBindingForm < ' tcx > {
608
- /// The `HirId` of the variable.
609
- pub var_id : hir:: HirId ,
610
608
/// Is variable bound via `x`, `mut x`, `ref x`, or `ref mut x`?
611
609
pub binding_mode : ty:: BindingMode ,
612
610
/// If an explicit type was provided for this variable binding,
@@ -656,7 +654,6 @@ pub enum ImplicitSelfKind {
656
654
CloneTypeFoldableAndLiftImpls ! { BindingForm <' tcx>, }
657
655
658
656
impl_stable_hash_for ! ( struct self :: VarBindingForm <' tcx> {
659
- var_id,
660
657
binding_mode,
661
658
opt_ty_info,
662
659
opt_match_place,
@@ -877,7 +874,9 @@ impl<'tcx> LocalDecl<'tcx> {
877
874
match self . is_user_variable {
878
875
Some ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
879
876
binding_mode : ty:: BindingMode :: BindByValue ( _) ,
880
- ..
877
+ opt_ty_info : _,
878
+ opt_match_place : _,
879
+ pat_span : _,
881
880
} ) ) ) => true ,
882
881
883
882
Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( ImplicitSelfKind :: Imm ) ) ) => true ,
@@ -893,7 +892,9 @@ impl<'tcx> LocalDecl<'tcx> {
893
892
match self . is_user_variable {
894
893
Some ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
895
894
binding_mode : ty:: BindingMode :: BindByValue ( _) ,
896
- ..
895
+ opt_ty_info : _,
896
+ opt_match_place : _,
897
+ pat_span : _,
897
898
} ) ) ) => true ,
898
899
899
900
Some ( ClearCrossCrate :: Set ( BindingForm :: ImplicitSelf ( _) ) ) => true ,
@@ -2830,7 +2831,7 @@ impl Location {
2830
2831
#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , RustcEncodable , RustcDecodable , HashStable ) ]
2831
2832
pub enum UnsafetyViolationKind {
2832
2833
General ,
2833
- /// Permitted in const fns and regular fns .
2834
+ /// Permitted both in ` const fn`s and regular `fn`s .
2834
2835
GeneralAndConstFn ,
2835
2836
ExternStatic ( hir:: HirId ) ,
2836
2837
BorrowPacked ( hir:: HirId ) ,
@@ -2848,7 +2849,7 @@ pub struct UnsafetyViolation {
2848
2849
pub struct UnsafetyCheckResult {
2849
2850
/// Violations that are propagated *upwards* from this function.
2850
2851
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
2852
2853
/// used for the "unused_unsafe" lint.
2853
2854
pub unsafe_blocks : Lrc < [ ( hir:: HirId , bool ) ] > ,
2854
2855
}
@@ -2875,12 +2876,14 @@ pub struct GeneratorLayout<'tcx> {
2875
2876
/// layout.
2876
2877
pub storage_conflicts : BitMatrix < GeneratorSavedLocal , GeneratorSavedLocal > ,
2877
2878
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.
2879
2885
//
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.
2884
2887
pub __local_debuginfo_codegen_only_do_not_use : IndexVec < GeneratorSavedLocal , LocalDecl < ' tcx > > ,
2885
2888
}
2886
2889
0 commit comments