77//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/borrow_check.html
88
99use crate :: ty:: TyCtxt ;
10- use rustc_hir as hir;
11- use rustc_hir:: Node ;
12- use rustc_query_system:: ich:: { NodeIdHashingMode , StableHashingContext } ;
13-
1410use rustc_data_structures:: fx:: FxHashMap ;
1511use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
12+ use rustc_hir as hir;
13+ use rustc_hir:: Node ;
1614use rustc_macros:: HashStable ;
15+ use rustc_query_system:: ich:: { NodeIdHashingMode , StableHashingContext } ;
1716use rustc_span:: { Span , DUMMY_SP } ;
1817
1918use std:: fmt;
@@ -210,11 +209,6 @@ pub struct ScopeTree {
210209 /// If not empty, this body is the root of this region hierarchy.
211210 pub root_body : Option < hir:: HirId > ,
212211
213- /// The parent of the root body owner, if the latter is an
214- /// an associated const or method, as impls/traits can also
215- /// have lifetime parameters free in this body.
216- pub root_parent : Option < hir:: HirId > ,
217-
218212 /// Maps from a scope ID to the enclosing scope id;
219213 /// this is usually corresponding to the lexical nesting, though
220214 /// in the case of closures the parent scope is the innermost
@@ -445,7 +439,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
445439 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
446440 let ScopeTree {
447441 root_body,
448- root_parent,
449442 ref body_expr_count,
450443 ref parent_map,
451444 ref var_map,
@@ -455,8 +448,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
455448 } = * self ;
456449
457450 hcx. with_node_id_hashing_mode ( NodeIdHashingMode :: HashDefPath , |hcx| {
458- root_body. hash_stable ( hcx, hasher) ;
459- root_parent. hash_stable ( hcx, hasher) ;
451+ root_body. hash_stable ( hcx, hasher)
460452 } ) ;
461453
462454 body_expr_count. hash_stable ( hcx, hasher) ;
0 commit comments