diff options
| author | bors <bors@rust-lang.org> | 2020-05-24 04:15:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-24 04:15:08 +0000 |
| commit | 52b605c8cb2f730e607de0777a694cd1b9bb3e15 (patch) | |
| tree | 76b2d8ffdbf91406cecabaf3c63ed9e9104b25a2 /src/librustc_mir | |
| parent | 3137f8e2d141d7d7c65040a718a9193f50e1282e (diff) | |
| parent | 9754b3fc1d9d24bc1e65136e5798cc5a6d226a4f (diff) | |
| download | rust-52b605c8cb2f730e607de0777a694cd1b9bb3e15.tar.gz rust-52b605c8cb2f730e607de0777a694cd1b9bb3e15.zip | |
Auto merge of #72362 - matthewjasper:remove-rescope, r=nikomatsakis
Remove ReScope `ReScope` is unnecessary now that AST borrowck is gone and we're erasing the results of region inference in function bodies. This removes about as much of the old regionck code as possible without having to enable NLL fully. cc #68261 r? @nikomatsakis
Diffstat (limited to 'src/librustc_mir')
| -rw-r--r-- | src/librustc_mir/borrow_check/diagnostics/region_errors.rs | 4 | ||||
| -rw-r--r-- | src/librustc_mir/borrow_check/diagnostics/region_name.rs | 1 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/librustc_mir/borrow_check/diagnostics/region_errors.rs b/src/librustc_mir/borrow_check/diagnostics/region_errors.rs index ebc8021a3c5..e19fab89eab 100644 --- a/src/librustc_mir/borrow_check/diagnostics/region_errors.rs +++ b/src/librustc_mir/borrow_check/diagnostics/region_errors.rs @@ -162,10 +162,8 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { let type_test_span = type_test.locations.span(&self.body); if let Some(lower_bound_region) = lower_bound_region { - let region_scope_tree = &self.infcx.tcx.region_scope_tree(self.mir_def_id); self.infcx .construct_generic_bound_failure( - region_scope_tree, type_test_span, None, type_test.generic_kind, @@ -194,12 +192,10 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> { } RegionErrorKind::UnexpectedHiddenRegion { span, hidden_ty, member_region } => { - let region_scope_tree = &self.infcx.tcx.region_scope_tree(self.mir_def_id); let named_ty = self.regioncx.name_regions(self.infcx.tcx, hidden_ty); let named_region = self.regioncx.name_regions(self.infcx.tcx, member_region); unexpected_hidden_region_diagnostic( self.infcx.tcx, - Some(region_scope_tree), span, named_ty, named_region, diff --git a/src/librustc_mir/borrow_check/diagnostics/region_name.rs b/src/librustc_mir/borrow_check/diagnostics/region_name.rs index 37e2e047504..e912ef7b202 100644 --- a/src/librustc_mir/borrow_check/diagnostics/region_name.rs +++ b/src/librustc_mir/borrow_check/diagnostics/region_name.rs @@ -284,7 +284,6 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> { }, ty::ReLateBound(..) - | ty::ReScope(..) | ty::ReVar(..) | ty::RePlaceholder(..) | ty::ReEmpty(_) |
