summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-04-17 19:46:16 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-04-17 19:46:16 -0300
commitad35c9f8aac015a073127780cfb2e515bdae2fb4 (patch)
tree4ad3efb068644f1745ab2a05fa20f5b6a945df12
parent6745da74000158e02bdf049e37ceec29e546827f (diff)
Clarify the variance of LtPhPtr
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 012846d..9371275 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -297,6 +297,8 @@ pub unsafe trait Plugin<'ph> {
 pub struct LtPhPtr<'ph> {
     ph: *mut RawPh,
     // 'ph has to be invariant because RawPh is self-referential.
+    // "ideally" we'd want `&'ph mut RawPh<'ph>`, tho the `*mut` above would've
+    // had the same effect if `RawPh` were `RawPh<'ph>`.
     _lt: PhantomData<fn(&'ph ()) -> &'ph ()>,
 }