Rollup merge of #94849 - ouz-a:master4, r=oli-obk
Check var scope if it exist Fixes #92893. Added helper function to check the scope of a variable, if it doesn't have a scope call delay_span_bug, which avoids us trying to get a block/scope that doesn't exist. Had to increase `ROOT_ENTRY_LIMIT` was getting tidy error
This commit is contained in:
commit
a32e0f3041
7 changed files with 41 additions and 15 deletions
|
@ -319,7 +319,7 @@ impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
|
|||
self.expr_count += 1;
|
||||
|
||||
if let PatKind::Binding(..) = pat.kind {
|
||||
let scope = self.region_scope_tree.var_scope(pat.hir_id.local_id);
|
||||
let scope = self.region_scope_tree.var_scope(pat.hir_id.local_id).unwrap();
|
||||
let ty = self.fcx.typeck_results.borrow().pat_ty(pat);
|
||||
self.record(ty, pat.hir_id, Some(scope), None, pat.span, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue