Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/next_solver/region.rs')
-rw-r--r--crates/hir-ty/src/next_solver/region.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/crates/hir-ty/src/next_solver/region.rs b/crates/hir-ty/src/next_solver/region.rs
index 317aaa9c57..dc753a1b47 100644
--- a/crates/hir-ty/src/next_solver/region.rs
+++ b/crates/hir-ty/src/next_solver/region.rs
@@ -78,7 +78,7 @@ impl<'db> Region<'db> {
pub fn new_late_param(
interner: DbInterner<'db>,
scope: SolverDefId,
- bound_region: BoundRegionKind<'db>,
+ bound_region: BoundRegion<'db>,
) -> Region<'db> {
let late_bound_region = LateParamRegion { scope, bound_region };
Region::new(interner, RegionKind::ReLateParam(late_bound_region))
@@ -164,17 +164,13 @@ pub struct EarlyParamRegion {
}
#[derive(Copy, Clone, PartialEq, Eq, Hash, GenericTypeVisitable)]
-/// The parameter representation of late-bound function parameters, "some region
-/// at least as big as the scope `fr.scope`".
+/// Represents a liberated late-bound function lifetime parameter.
///
-/// Similar to a placeholder region as we create `LateParam` regions when entering a binder
-/// except they are always in the root universe and instead of using a boundvar to distinguish
-/// between others we use the `DefId` of the parameter. For this reason the `bound_region` field
-/// should basically always be `BoundRegionKind::Named` as otherwise there is no way of telling
-/// different parameters apart.
+/// This denotes some region at least as big as `scope`. It is similar to a placeholder region
+/// created when entering a binder, except it always lives in the root universe.
pub struct LateParamRegion<'db> {
pub scope: SolverDefId,
- pub bound_region: BoundRegionKind<'db>,
+ pub bound_region: BoundRegion<'db>,
}
impl std::fmt::Debug for LateParamRegion<'_> {