`box "foo"` would create a SomeBox<&'static str>, as outlined in the meeting notes:
box "foo" -> Heap<&'static Str> "foo".to_owned() -> Heap<Str> (or ~Str) Heap::from("foo") -> Heap<Str> (or ~Str) Rc::from("foo") -> Rc<Str> On Tue, Apr 15, 2014 at 2:06 PM, SiegeLord <slab...@aim.com> wrote: > On 04/15/2014 01:12 PM, Patrick Walton wrote: >> >> The new replacement for `~"foo"` will be `"foo".to_owned()`. You can >> also use the `fmt!()` macro or the `.to_str()` function. Post-DST, you >> will likely also be able to write `Heap::from("foo")`. > > > Why not `box "foo"`? Is that scheduled to break? > > -SL > > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev -- http://octayn.net/ _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev