From: Ian Jackson Date: Fri, 15 Nov 2024 16:02:44 +0000 (+0000) Subject: move stack commented-out block X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=0272deb4bd1168ac1320523aa7401fe906761feb;p=manually-boxed move stack commented-out block --- diff --git a/src/lib.rs b/src/lib.rs index 4910df5..f2a35f7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -401,18 +401,6 @@ impl Ptr { }; t } - -/* - /// SAFETY - /// - /// All copies of the returned `Ptr` become invalid - /// when the borrow of `t` ends. - /// No-one must use them after that. - /// - /// You must not call `deallocate` on the return value. -TODO lifetime is hard - pub unsafe fn new_borrowed<'t>(t: Pin<&'t mut T>) -> Self { todo!() } -*/ } impl NoAliasSingleton { @@ -435,6 +423,18 @@ impl NoAliasSingleton { pub unsafe fn init() -> Self { NoAliasSingleton {} } } +/* + /// SAFETY + /// + /// All copies of the returned `Ptr` become invalid + /// when the borrow of `t` ends. + /// No-one must use them after that. + /// + /// You must not call `deallocate` on the return value. +TODO lifetime is hard + pub unsafe fn new_borrowed<'t>(t: Pin<&'t mut T>) -> Self { todo!() } +*/ + //---------- helpful impls ---------- impl From> for Ptr {