7
7
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/borrow_check.html
8
8
9
9
use crate :: ty:: TyCtxt ;
10
- use rustc_hir as hir;
11
- use rustc_hir:: Node ;
12
- use rustc_query_system:: ich:: { NodeIdHashingMode , StableHashingContext } ;
13
-
14
10
use rustc_data_structures:: fx:: FxHashMap ;
15
11
use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
12
+ use rustc_hir as hir;
13
+ use rustc_hir:: Node ;
16
14
use rustc_macros:: HashStable ;
15
+ use rustc_query_system:: ich:: { NodeIdHashingMode , StableHashingContext } ;
17
16
use rustc_span:: { Span , DUMMY_SP } ;
18
17
19
18
use std:: fmt;
@@ -210,11 +209,6 @@ pub struct ScopeTree {
210
209
/// If not empty, this body is the root of this region hierarchy.
211
210
pub root_body : Option < hir:: HirId > ,
212
211
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
-
218
212
/// Maps from a scope ID to the enclosing scope id;
219
213
/// this is usually corresponding to the lexical nesting, though
220
214
/// in the case of closures the parent scope is the innermost
@@ -445,7 +439,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
445
439
fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
446
440
let ScopeTree {
447
441
root_body,
448
- root_parent,
449
442
ref body_expr_count,
450
443
ref parent_map,
451
444
ref var_map,
@@ -455,8 +448,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
455
448
} = * self ;
456
449
457
450
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)
460
452
} ) ;
461
453
462
454
body_expr_count. hash_stable ( hcx, hasher) ;
0 commit comments