]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-22872.rs
Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errors
[rust.git] / tests / ui / issues / issue-22872.rs
1 trait Wrap<'b> {
2     fn foo(&'b mut self);
3 }
4
5 struct Wrapper<P>(P);
6
7 impl<'b, P> Wrap<'b> for Wrapper<P>
8 where P: Process<'b>,
9       <P as Process<'b>>::Item: Iterator {
10     fn foo(&mut self) {}
11 }
12
13
14 pub trait Process<'a> {
15     type Item;
16     fn bar(&'a self);
17 }
18
19 fn push_process<P>(process: P) where P: Process<'static> {
20     let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
21 //~^ ERROR is not an iterator
22 }
23
24 fn main() {}