File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
compiler/rustc_typeck/src/check Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -797,6 +797,11 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> {
797797
798798/// Per-body `region::ScopeTree`. The `DefId` should be the owner `DefId` for the body;
799799/// in the case of closures, this will be redirected to the enclosing function.
800+ ///
801+ /// Performance: This is a query rather than a simple function to enable
802+ /// re-use in incremental scenarios. We may sometimes need to rerun the
803+ /// type checker even when the HIR hasn't changed, and in those cases
804+ /// we can avoid reconstructing the region scope tree.
800805pub fn region_scope_tree ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> & ScopeTree {
801806 let typeck_root_def_id = tcx. typeck_root_def_id ( def_id) ;
802807 if typeck_root_def_id != def_id {
You can’t perform that action at this time.
0 commit comments