diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-11 19:33:52 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-14 10:45:37 -0700 |
| commit | ade807c6dcf6dc4454732c5e914ca06ebb429773 (patch) | |
| tree | 64606dac9c81ec4567e19f503d4d82e249dbf40a /src/test/debuginfo/recursive-struct.rs | |
| parent | f20b1293fcce4e120bd4a57226e0817271cd672c (diff) | |
| download | rust-ade807c6dcf6dc4454732c5e914ca06ebb429773.tar.gz rust-ade807c6dcf6dc4454732c5e914ca06ebb429773.zip | |
rustc: Obsolete the `@` syntax entirely
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
Diffstat (limited to 'src/test/debuginfo/recursive-struct.rs')
| -rw-r--r-- | src/test/debuginfo/recursive-struct.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 518ef62fe9a..ea0867903b5 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -106,6 +106,7 @@ #![allow(unused_variable)] #![feature(struct_variant)] +use std::gc::{Gc, GC}; enum Opt<T> { Empty, @@ -118,7 +119,7 @@ struct UniqueNode<T> { } struct ManagedNode<T> { - next: Opt<@ManagedNode<T>>, + next: Opt<Gc<ManagedNode<T>>>, value: T } @@ -183,7 +184,7 @@ fn main() { value: 2, }; - let box_unique: @UniqueNode<u64> = @UniqueNode { + let box_unique: Gc<UniqueNode<u64>> = box(GC) UniqueNode { next: Val { val: box UniqueNode { next: Empty, @@ -215,7 +216,7 @@ fn main() { let stack_managed: ManagedNode<u16> = ManagedNode { next: Val { - val: @ManagedNode { + val: box(GC) ManagedNode { next: Empty, value: 11, } @@ -225,7 +226,7 @@ fn main() { let unique_managed: Box<ManagedNode<u32>> = box ManagedNode { next: Val { - val: @ManagedNode { + val: box(GC) ManagedNode { next: Empty, value: 13, } @@ -233,9 +234,9 @@ fn main() { value: 12, }; - let box_managed: @ManagedNode<u64> = @ManagedNode { + let box_managed: Gc<ManagedNode<u64>> = box(GC) ManagedNode { next: Val { - val: @ManagedNode { + val: box(GC) ManagedNode { next: Empty, value: 15, } @@ -245,7 +246,7 @@ fn main() { let vec_managed: [ManagedNode<f32>, ..1] = [ManagedNode { next: Val { - val: @ManagedNode { + val: box(GC) ManagedNode { next: Empty, value: 17.5, } @@ -255,7 +256,7 @@ fn main() { let borrowed_managed: &ManagedNode<f64> = &ManagedNode { next: Val { - val: @ManagedNode { + val: box(GC) ManagedNode { next: Empty, value: 19.5, } |
