1 #![feature(unsized_locals)]
5 fn gen_foo() -> Box<fmt::Display> {
6 Box::new(Box::new("foo"))
9 fn foo(x: fmt::Display) {
10 assert_eq!(x.to_string(), "foo");
13 fn foo_indirect(x: fmt::Display) {
19 foo_indirect(*gen_foo());
22 let x: fmt::Display = *gen_foo();
27 let x: fmt::Display = *gen_foo();
28 let y: fmt::Display = *gen_foo();
34 let mut cnt: usize = 3;
36 let x: fmt::Display = *gen_foo();
47 let x: fmt::Display = *gen_foo();