Auto merge of #24737 - P1start:dst-cell, r=alexcrichton

This + DST coercions (#24619) would allow code like `Rc<RefCell<Box<Trait>>>` to be simplified to `Rc<RefCell<Trait>>`.
This commit is contained in:
bors 2015-05-03 17:22:09 +00:00
commit 1a60dc4fc4
6 changed files with 126 additions and 72 deletions

View file

@ -8,14 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::cell::RefCell;
trait Trait {}
pub fn main() {
let x: Vec<Trait + Sized> = Vec::new();
//~^ ERROR the trait `core::marker::Sized` is not implemented
//~^^ ERROR the trait `core::marker::Sized` is not implemented
let x: Vec<Box<RefCell<Trait + Sized>>> = Vec::new();
//~^ ERROR the trait `core::marker::Sized` is not implemented
}