about summary refs log tree commit diff
path: root/src/test/ui/issues/issue-41139.rs
blob: 0bfbea11b0e0810ab4ba8baab8488c99770325c5 (plain)
1
2
3
4
5
6
7
8
trait Trait {}

fn get_function<'a>() -> &'a Fn() -> Trait { panic!("") }

fn main() {
    let t : &Trait = &get_function()();
    //~^ ERROR cannot move a value of type (dyn Trait + 'static)
}