chiark / gitweb /
move stack commented-out block
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Nov 2024 16:02:44 +0000 (16:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Nov 2024 16:02:51 +0000 (16:02 +0000)
src/lib.rs

index 4910df5c26e50e84b6b2316d7b5cf3e3afee805c..f2a35f72815b8166c1de39d3691c9ef92df40c2b 100644 (file)
@@ -401,18 +401,6 @@ impl<T: ?Sized> Ptr<T> {
         };
         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<T: ?Sized> From<Box<T>> for Ptr<T> {