@@ -28,10 +28,12 @@ impl_stable_hash_for!(struct mir::LocalDecl<'tcx> {
2828 name,
2929 source_info,
3030 internal,
31+ lexical_scope,
3132 is_user_variable
3233} ) ;
3334impl_stable_hash_for ! ( struct mir:: UpvarDecl { debug_name, by_ref } ) ;
3435impl_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 } ) ;
3537
3638impl < ' gcx > HashStable < StableHashingContext < ' gcx > >
3739for mir:: Terminator < ' gcx > {
@@ -75,6 +77,22 @@ for mir::Terminator<'gcx> {
7577 }
7678}
7779
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+ }
7896
7997impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for mir:: Local {
8098 #[ inline]
@@ -347,6 +365,26 @@ for mir::ProjectionElem<'gcx, V, T>
347365}
348366
349367impl_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+ }
350388
351389impl < ' gcx > HashStable < StableHashingContext < ' gcx > > for mir:: Operand < ' gcx > {
352390 fn hash_stable < W : StableHasherResult > ( & self ,
0 commit comments