]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-35976.rs
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
[rust.git] / src / test / ui / issues / issue-35976.rs
1 mod private {
2     pub trait Future {
3         fn wait(&self) where Self: Sized;
4     }
5
6     impl Future for Box<dyn Future> {
7         fn wait(&self) { }
8     }
9 }
10
11 //use private::Future;
12
13 fn bar(arg: Box<dyn private::Future>) {
14     arg.wait();
15     //~^ ERROR the `wait` method cannot be invoked on a trait object
16 }
17
18 fn main() {
19
20 }