about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2024-05-23 14:48:27 +0100
committerBoxy <supbscripter@gmail.com>2024-05-24 17:33:48 +0100
commitb7b350cff7e2b893517f5924c2c7c7f8ae9eb2ac (patch)
tree2d25cb26e16cde60223ff3535d4d425748a0c2d1 /compiler/rustc_middle/src
parent213ad10c8f0fc275648552366275dc4e07f97462 (diff)
docs
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/region.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/region.rs b/compiler/rustc_middle/src/ty/region.rs
index 958e7e40168..4dcd9952f1d 100644
--- a/compiler/rustc_middle/src/ty/region.rs
+++ b/compiler/rustc_middle/src/ty/region.rs
@@ -352,6 +352,12 @@ impl std::fmt::Debug for EarlyParamRegion {
 #[derive(HashStable)]
 /// The parameter representation of late-bound function parameters, "some region
 /// at least as big as the scope `fr.scope`".
+///
+/// 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::BrNamed` as otherwise there is no way of telling
+/// different parameters apart.
 pub struct LateParamRegion {
     pub scope: DefId,
     pub bound_region: BoundRegionKind,