rust/src/test/ui/issues/issue-35976.rs
2018-12-25 21:08:33 -07:00

21 lines
319 B
Rust

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