From ad35c9f8aac015a073127780cfb2e515bdae2fb4 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sun, 17 Apr 2022 19:46:16 -0300 Subject: Clarify the variance of LtPhPtr --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 &'ph ()>, } -- cgit 1.4.1