about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-03 22:06:03 +0000
committerMichael Goulet <michael@errs.io>2024-11-04 04:45:52 +0000
commitd458f850aad26480df913ddddfdeec9065f9e985 (patch)
treef199f1d61357441bf748ced2fe7041a22e6ad6f7 /compiler/rustc_ty_utils
parent883f8705d490a3d1f8f83610663958d1f3ac5f1c (diff)
downloadrust-d458f850aad26480df913ddddfdeec9065f9e985.tar.gz
rust-d458f850aad26480df913ddddfdeec9065f9e985.zip
ty::BrK -> ty::BoundRegionKind::K
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/abi.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs
index 42b710687cf..0838978a891 100644
--- a/compiler/rustc_ty_utils/src/abi.rs
+++ b/compiler/rustc_ty_utils/src/abi.rs
@@ -76,12 +76,13 @@ fn fn_sig_for_fn_abi<'tcx>(
         ty::Closure(def_id, args) => {
             let sig = args.as_closure().sig();
 
-            let bound_vars = tcx.mk_bound_variable_kinds_from_iter(
-                sig.bound_vars().iter().chain(iter::once(ty::BoundVariableKind::Region(ty::BrEnv))),
-            );
+            let bound_vars =
+                tcx.mk_bound_variable_kinds_from_iter(sig.bound_vars().iter().chain(iter::once(
+                    ty::BoundVariableKind::Region(ty::BoundRegionKind::ClosureEnv),
+                )));
             let br = ty::BoundRegion {
                 var: ty::BoundVar::from_usize(bound_vars.len() - 1),
-                kind: ty::BoundRegionKind::BrEnv,
+                kind: ty::BoundRegionKind::ClosureEnv,
             };
             let env_region = ty::Region::new_bound(tcx, ty::INNERMOST, br);
             let env_ty = tcx.closure_env_ty(
@@ -105,12 +106,13 @@ fn fn_sig_for_fn_abi<'tcx>(
         ty::CoroutineClosure(def_id, args) => {
             let coroutine_ty = Ty::new_coroutine_closure(tcx, def_id, args);
             let sig = args.as_coroutine_closure().coroutine_closure_sig();
-            let bound_vars = tcx.mk_bound_variable_kinds_from_iter(
-                sig.bound_vars().iter().chain(iter::once(ty::BoundVariableKind::Region(ty::BrEnv))),
-            );
+            let bound_vars =
+                tcx.mk_bound_variable_kinds_from_iter(sig.bound_vars().iter().chain(iter::once(
+                    ty::BoundVariableKind::Region(ty::BoundRegionKind::ClosureEnv),
+                )));
             let br = ty::BoundRegion {
                 var: ty::BoundVar::from_usize(bound_vars.len() - 1),
-                kind: ty::BoundRegionKind::BrEnv,
+                kind: ty::BoundRegionKind::ClosureEnv,
             };
             let env_region = ty::Region::new_bound(tcx, ty::INNERMOST, br);
             // When this `CoroutineClosure` comes from a `ConstructCoroutineInClosureShim`,
@@ -161,11 +163,11 @@ fn fn_sig_for_fn_abi<'tcx>(
             let sig = args.as_coroutine().sig();
 
             let bound_vars = tcx.mk_bound_variable_kinds_from_iter(iter::once(
-                ty::BoundVariableKind::Region(ty::BrEnv),
+                ty::BoundVariableKind::Region(ty::BoundRegionKind::ClosureEnv),
             ));
             let br = ty::BoundRegion {
                 var: ty::BoundVar::from_usize(bound_vars.len() - 1),
-                kind: ty::BoundRegionKind::BrEnv,
+                kind: ty::BoundRegionKind::ClosureEnv,
             };
 
             let env_ty = Ty::new_mut_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), ty);