2017-04-11 15:53:20 -05:00
|
|
|
trait Trait {}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
fn get_function<'a>() -> &'a dyn Fn() -> dyn Trait { panic!("") }
|
2017-04-11 15:53:20 -05:00
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 13:46:13 -05:00
|
|
|
let t : &dyn Trait = &get_function()();
|
2019-04-22 02:40:08 -05:00
|
|
|
//~^ ERROR cannot move a value of type dyn Trait
|
2017-04-11 15:53:20 -05:00
|
|
|
}
|