chiark / gitweb /
w
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 14 Nov 2024 17:22:18 +0000 (17:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 14 Nov 2024 21:49:40 +0000 (21:49 +0000)
src/lib.rs

index 2b21b20fc99fe1f25506b731b1f31f47bfef7c93..436871deb63a1dfba44af0f901116f9c6e807786 100644 (file)
@@ -32,12 +32,6 @@ where A: IsMutToken<'a>, 'a: 'r, 'aa: 'r {}
 unsafe impl<'r, 'a, 'aa, A> IsMutToken<'r> for &'aa mut A
 where A: IsMutToken<'a>, 'a: 'r, 'aa: 'r {}
 
-/*impl Deref for 
-    type Target = NoAlias<'a>;
-    fn deref(
-} */   
-
-
 #[derive(Debug, Clone, Copy)]
 pub struct RefToken<'a>(
     PhantomData<&'a NoAliasSingleton>,
@@ -202,17 +196,16 @@ mod tests {
             }
 
             pub fn pop_front(&mut self) -> Option<T> {
-                let mut noalias = self.noalias.mut_token();
-                let tok = &mut noalias;
+                let tok = self.noalias.mut_token();
                 Self::pop_front_inner(
-                    noalias,
+                    tok,
                     &mut self.head,
                     &mut self.tail,
                 )
             }
 
             // We wouldn't do this, since it's daft, but
-            // it lets us demonstrate passing a NoAlias.
+            // it lets us demonstrate passing a token.
             fn pop_front_inner<'a>(
                 mut tok: MutToken<'a>,
                 head: &mut Option<Ptr<Node<T>>>,