1 #![feature(unsized_locals)]
2 #![allow(incomplete_features)]
6 fn foo(self) -> String;
12 fn foo(self) -> String {
17 let x = *(Box::new(A) as Box<dyn Foo>); //~ERROR: unsized locals are not supported
18 assert_eq!(x.foo(), format!("hello"));
20 // I'm not sure whether we want this to work
21 let x = Box::new(A) as Box<dyn Foo>;
22 assert_eq!(x.foo(), format!("hello"));