@@ -307,11 +307,6 @@ pub struct ScopeTree {
307307 /// the values are still owned by their containing expressions. So
308308 /// we'll see that `&x`.
309309 pub yield_in_scope : FxHashMap < Scope , Vec < YieldData > > ,
310-
311- /// The number of visit_expr and visit_pat calls done in the body.
312- /// Used to sanity check visit_expr/visit_pat call count when
313- /// calculating coroutine interiors.
314- pub body_expr_count : FxHashMap < hir:: BodyId , usize > ,
315310}
316311
317312/// Identifies the reason that a given expression is an rvalue candidate
@@ -408,20 +403,12 @@ impl ScopeTree {
408403 pub fn yield_in_scope ( & self , scope : Scope ) -> Option < & [ YieldData ] > {
409404 self . yield_in_scope . get ( & scope) . map ( Deref :: deref)
410405 }
411-
412- /// Gives the number of expressions visited in a body.
413- /// Used to sanity check visit_expr call count when
414- /// calculating coroutine interiors.
415- pub fn body_expr_count ( & self , body_id : hir:: BodyId ) -> Option < usize > {
416- self . body_expr_count . get ( & body_id) . copied ( )
417- }
418406}
419407
420408impl < ' a > HashStable < StableHashingContext < ' a > > for ScopeTree {
421409 fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
422410 let ScopeTree {
423411 root_body,
424- ref body_expr_count,
425412 ref parent_map,
426413 ref var_map,
427414 ref destruction_scopes,
@@ -430,7 +417,6 @@ impl<'a> HashStable<StableHashingContext<'a>> for ScopeTree {
430417 } = * self ;
431418
432419 root_body. hash_stable ( hcx, hasher) ;
433- body_expr_count. hash_stable ( hcx, hasher) ;
434420 parent_map. hash_stable ( hcx, hasher) ;
435421 var_map. hash_stable ( hcx, hasher) ;
436422 destruction_scopes. hash_stable ( hcx, hasher) ;
0 commit comments