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:
commit
1a60dc4fc4
6 changed files with 126 additions and 72 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue