summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-35976.rs
blob: d075794d9946fe40da855c4234695fbb230c95fd (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<dyn Future> {
        fn wait(&self) { }
    }
}

//use private::Future;

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

fn main() {

}