about summary refs log tree commit diff
path: root/compiler/rustc_lint
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-15 12:55:42 +0000
committerbors <bors@rust-lang.org>2023-11-15 12:55:42 +0000
commit1500db73145da12e90ca1a040622a9eaa0bdad2e (patch)
tree1f4f5853c8dee0a95bcc77d2a4082f6e95479fd7 /compiler/rustc_lint
parent383bf020f2d797c139733dc22e1d120da6274e1c (diff)
parent18281d39cf425eecfc3b6058875832ef4dba3bac (diff)
downloadrust-1500db73145da12e90ca1a040622a9eaa0bdad2e.tar.gz
rust-1500db73145da12e90ca1a040622a9eaa0bdad2e.zip
Auto merge of #117908 - lcnr:region-kind-rename, r=BoxyUwU
finish `RegionKind` renaming

second step of https://github.com/rust-lang/types-team/issues/95

continues the work from #117876. While working on this and I encountered a bunch of further cleanup which I'll either open a tracking issue for or will do in a separate PR:
- rewrite the `RegionKind` docs, they still talk about `ReEmpty` and are generally out of date
- rename `DescriptionCtx` to `DescriptionCtxt`
- what is `CheckRegions::Bound`?
- `collect_late_bound_regions` et al
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased`?
- `EraseEarlyRegions` visitor should be removed, feels duplicate

r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_lint')
-rw-r--r--compiler/rustc_lint/src/builtin.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs
index 6f6150a4172..e3dd8faeedb 100644
--- a/compiler/rustc_lint/src/builtin.rs
+++ b/compiler/rustc_lint/src/builtin.rs
@@ -1910,7 +1910,7 @@ impl ExplicitOutlivesRequirements {
             .iter()
             .filter_map(|(clause, _)| match clause.kind().skip_binder() {
                 ty::ClauseKind::RegionOutlives(ty::OutlivesPredicate(a, b)) => match *a {
-                    ty::ReEarlyBound(ebr) if ebr.def_id == def_id => Some(b),
+                    ty::ReEarlyParam(ebr) if ebr.def_id == def_id => Some(b),
                     _ => None,
                 },
                 _ => None,
@@ -1953,7 +1953,7 @@ impl ExplicitOutlivesRequirements {
                 let is_inferred = match tcx.named_bound_var(lifetime.hir_id) {
                     Some(ResolvedArg::EarlyBound(def_id)) => inferred_outlives
                         .iter()
-                        .any(|r| matches!(**r, ty::ReEarlyBound(ebr) if { ebr.def_id == def_id })),
+                        .any(|r| matches!(**r, ty::ReEarlyParam(ebr) if { ebr.def_id == def_id })),
                     _ => false,
                 };