3 #![allow(incomplete_features)]
4 #![feature(unsized_locals)]
7 fn foo(self) -> String;
13 fn foo(self) -> String {
19 let x = *(Box::new(A) as Box<dyn Foo>);
20 assert_eq!(x.foo(), format!("hello"));
22 // I'm not sure whether we want this to work
23 let x = Box::new(A) as Box<dyn Foo>;
24 assert_eq!(x.foo(), format!("hello"));