• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 trait Wrap<'b> {
foo(&'b mut self)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 {
foo(&mut self)10     fn foo(&mut self) {}
11 }
12 
13 
14 pub trait Process<'a> {
15     type Item;
bar(&'a self)16     fn bar(&'a self);
17 }
18 
push_process<P>(process: P) where P: Process<'static>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 
main()24 fn main() {}
25