Skip to content

Commit 9fe7297

Browse files
committed
docs
1 parent 5baee04 commit 9fe7297

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_middle/src/ty/region.rs

+6
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ impl std::fmt::Debug for EarlyParamRegion {
351351
#[derive(HashStable)]
352352
/// The parameter representation of late-bound function parameters, "some region
353353
/// at least as big as the scope `fr.scope`".
354+
///
355+
/// Similar to a placeholder region as we create `LateParam` regions when entering a binder
356+
/// except they are always in the root universe and instead of using a boundvar to distinguish
357+
/// between others we use the `DefId` of the parameter. For this reason the `bound_region` field
358+
/// should basically always be `BoundRegionKind::BrNamed` as otherwise there is no way of telling
359+
/// different parameters apart.
354360
pub struct LateParamRegion {
355361
pub scope: DefId,
356362
pub bound_region: BoundRegionKind,

0 commit comments

Comments
 (0)