rust/src/test/ui/issues/issue-41139.rs
2019-05-29 00:57:31 -04:00

9 lines
194 B
Rust

trait Trait {}
fn get_function<'a>() -> &'a dyn Fn() -> dyn Trait { panic!("") }
fn main() {
let t : &dyn Trait = &get_function()();
//~^ ERROR cannot move a value of type dyn Trait
}