fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB24 linesraw
1error[E0277]: `<P as Process<'_>>::Item` is not an iterator
2  --> $DIR/issue-22872.rs:20:40
3   |
4LL |     let _: Box<dyn for<'b> Wrap<'b>> = Box::new(Wrapper(process));
5   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ `<P as Process<'_>>::Item` is not an iterator
6   |
7   = help: the trait `Iterator` is not implemented for `<P as Process<'_>>::Item`
8note: required for `Wrapper<P>` to implement `for<'b> Wrap<'b>`
9  --> $DIR/issue-22872.rs:7:13
10   |
11LL | impl<'b, P> Wrap<'b> for Wrapper<P>
12   |             ^^^^^^^^     ^^^^^^^^^^
13LL | where P: Process<'b>,
14LL |       <P as Process<'b>>::Item: Iterator {
15   |                                 -------- unsatisfied trait bound introduced here
16   = note: required for the cast from `Box<Wrapper<P>>` to `Box<dyn for<'b> Wrap<'b>>`
17help: consider further restricting the associated type
18   |
19LL | fn push_process<P>(process: P) where P: Process<'static>, <P as Process<'_>>::Item: Iterator {
20   |                                                         ++++++++++++++++++++++++++++++++++++
21
22error: aborting due to previous error
23
24For more information about this error, try `rustc --explain E0277`.