diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-04-17 19:46:16 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-04-17 19:46:16 -0300 |
commit | ad35c9f8aac015a073127780cfb2e515bdae2fb4 (patch) | |
tree | 4ad3efb068644f1745ab2a05fa20f5b6a945df12 /src | |
parent | 6745da74000158e02bdf049e37ceec29e546827f (diff) |
Clarify the variance of LtPhPtr
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 2 |
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 ()>, } |