@@ -28,10 +28,12 @@ impl_stable_hash_for!(struct mir::LocalDecl<'tcx> {
28
28
name,
29
29
source_info,
30
30
internal,
31
+ lexical_scope,
31
32
is_user_variable
32
33
} ) ;
33
34
impl_stable_hash_for ! ( struct mir:: UpvarDecl { debug_name, by_ref } ) ;
34
35
impl_stable_hash_for ! ( struct mir:: BasicBlockData <' tcx> { statements, terminator, is_cleanup } ) ;
36
+ impl_stable_hash_for ! ( struct mir:: UnsafetyViolation { source_info, description, lint_node_id } ) ;
35
37
36
38
impl < ' gcx > HashStable < StableHashingContext < ' gcx > >
37
39
for mir:: Terminator < ' gcx > {
@@ -75,6 +77,22 @@ for mir::Terminator<'gcx> {
75
77
}
76
78
}
77
79
80
+ impl < ' gcx , T > HashStable < StableHashingContext < ' gcx > > for mir:: ClearOnDecode < T >
81
+ where T : HashStable < StableHashingContext < ' gcx > >
82
+ {
83
+ #[ inline]
84
+ fn hash_stable < W : StableHasherResult > ( & self ,
85
+ hcx : & mut StableHashingContext < ' gcx > ,
86
+ hasher : & mut StableHasher < W > ) {
87
+ mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
88
+ match * self {
89
+ mir:: ClearOnDecode :: Clear => { }
90
+ mir:: ClearOnDecode :: Set ( ref value) => {
91
+ value. hash_stable ( hcx, hasher) ;
92
+ }
93
+ }
94
+ }
95
+ }
78
96
79
97
impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for mir:: Local {
80
98
#[ inline]
@@ -347,6 +365,26 @@ for mir::ProjectionElem<'gcx, V, T>
347
365
}
348
366
349
367
impl_stable_hash_for ! ( struct mir:: VisibilityScopeData { span, parent_scope } ) ;
368
+ impl_stable_hash_for ! ( struct mir:: VisibilityScopeInfo {
369
+ lint_root, safety
370
+ } ) ;
371
+
372
+ impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for mir:: Safety {
373
+ fn hash_stable < W : StableHasherResult > ( & self ,
374
+ hcx : & mut StableHashingContext < ' gcx > ,
375
+ hasher : & mut StableHasher < W > ) {
376
+ mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
377
+
378
+ match * self {
379
+ mir:: Safety :: Safe |
380
+ mir:: Safety :: BuiltinUnsafe |
381
+ mir:: Safety :: FnUnsafe => { }
382
+ mir:: Safety :: ExplicitUnsafe ( node_id) => {
383
+ node_id. hash_stable ( hcx, hasher) ;
384
+ }
385
+ }
386
+ }
387
+ }
350
388
351
389
impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for mir:: Operand < ' gcx > {
352
390
fn hash_stable < W : StableHasherResult > ( & self ,
0 commit comments