diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-02-12 10:39:32 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-02-18 10:25:12 -0500 |
| commit | 2bcf3a4cd15f706dcb07b1835babeea15b8aa8c1 (patch) | |
| tree | 94c2490c7e2e62137ea58e10351601755b1abd79 | |
| parent | 8dbdcdbfb3d09c6d521b275e71370117850c89e2 (diff) | |
| download | rust-2bcf3a4cd15f706dcb07b1835babeea15b8aa8c1.tar.gz rust-2bcf3a4cd15f706dcb07b1835babeea15b8aa8c1.zip | |
Fallout: arena needs to use phantomdata since invariantlifetime is gone
| -rw-r--r-- | src/libarena/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 4cd3d587580..b43f9adfb26 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -96,7 +96,7 @@ pub struct Arena<'longer_than_self> { head: RefCell<Chunk>, copy_head: RefCell<Chunk>, chunks: RefCell<Vec<Chunk>>, - _invariant: marker::InvariantLifetime<'longer_than_self>, + _marker: marker::PhantomData<*mut &'longer_than_self()>, } impl<'a> Arena<'a> { @@ -111,7 +111,7 @@ impl<'a> Arena<'a> { head: RefCell::new(chunk(initial_size, false)), copy_head: RefCell::new(chunk(initial_size, true)), chunks: RefCell::new(Vec::new()), - _invariant: marker::InvariantLifetime, + _marker: marker::PhantomData, } } } @@ -361,6 +361,8 @@ pub struct TypedArena<T> { } struct TypedArenaChunk<T> { + marker: marker::PhantomData<T>, + /// Pointer to the next arena segment. next: *mut TypedArenaChunk<T>, |
