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

20 lines
327 B
Rust

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() {
}