summary refs log tree commit diff
path: root/src/test/ui/issues/issue-35976.rs
blob: 95c0cc95bb2baa5e85c6f17478303e449c236d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
mod private {
    pub trait Future {
        fn wait(&self) where Self: Sized;
    }

    impl Future for Box<Future> {
        fn wait(&self) { }
    }
}

//use private::Future;

fn bar(arg: Box<private::Future>) {
    arg.wait();
    //~^ ERROR the `wait` method cannot be invoked on a trait object
}

fn main() {

}