-// ignore-tidy-linelength
-
#![feature(box_patterns)]
-#![feature(box_syntax)]
+
struct S {
x: Box<E>
}
fn main() {
- let s = S { x: box E::Bar(box 42) };
+ let s = S { x: Box::new(E::Bar(Box::new(42))) };
loop {
f(&s, |hellothere| {
match hellothere.x { //~ ERROR cannot move out
- //~| cannot move out of borrowed content
box E::Foo(_) => {}
box E::Bar(x) => println!("{}", x.to_string()),
box E::Baz => {}