The full syntax is: "box" ["(" EXPR ")"] EXPRThe first expression is the "boxer", or where the result of the second expression will be stored. GC and HEAP are special cased right now as the only boxers, but the goal is to use a trait such that you can use Rc, arenas, vectors, or any other arbitrary type as a boxer. On Wed, Jul 2, 2014 at 7:29 PM, Oscar Boykin <[email protected]> wrote: > Once in the tutorial, I see this syntax: > > > let x = box(GC) [1i, 2, 3, 4, 5, 6, 7, 8, 9, 10]; > > It seems to me, that should be: box<Gc>, as it feels like box is referring > to a container type (which the default type is Box<_>, but may be Rc<_> or > Gc<_>). > > What is the principle behind the current notation? What is "GC" is this > context other than a special string that is a one-off syntax? > -- > Oscar Boykin :: @posco :: http://twitter.com/posco > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > -- http://octayn.net/ _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
