rust/src/liballoc
bors 99093b79f1 Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton
Sometimes when writing generic code you want to abstract over
owning/pointer type so that calling code isn't restricted by one
concrete owning/pointer type. This commit makes possible such code:
```rust
fn i_will_work_with_arc<T: Into<Arc<MyTy>>>(t: T) {
    let the_arc = t.into();
    // Do something
}

i_will_work_with_arc(MyTy::new());

i_will_work_with_arc(Box::new(MyTy::new()));

let arc_that_i_already_have = Arc::new(MyTy::new());
i_will_work_with_arc(arc_that_i_already_have);
```

Please note that this patch doesn't work with DSTs.
Also to mention, I made those impls stable, and I don't know whether they should be actually stable from the beginning. Please tell me if this should be feature-gated.
2015-11-16 19:06:52 +00:00
..
arc.rs Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton 2015-11-16 19:06:52 +00:00
boxed_test.rs rustfmt liballoc 2015-09-24 10:00:54 +12:00
boxed.rs Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton 2015-11-16 19:06:52 +00:00
heap.rs Better function calls 2015-09-24 11:32:01 +12:00
lib.rs liballoc: deny warnings in doctests 2015-11-12 05:15:08 +00:00
raw_vec.rs Fix excessive memory allocation in RawVec::reserve 2015-10-31 00:17:16 +03:00
rc.rs Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichton 2015-11-16 19:06:52 +00:00