|
| 1 | +error[E0277]: the trait bound `Query: LendingIterator` is not satisfied |
| 2 | + --> $DIR/leaked-vars-issue-122098.rs:10:31 |
| 3 | + | |
| 4 | +LL | LendingIterator::for_each(Query, Box::new); |
| 5 | + | ------------------------- ^^^^^ the trait `LendingIterator` is not implemented for `Query` |
| 6 | + | | |
| 7 | + | required by a bound introduced by this call |
| 8 | + | |
| 9 | +help: this trait has no implementations, consider adding one |
| 10 | + --> $DIR/leaked-vars-issue-122098.rs:2:1 |
| 11 | + | |
| 12 | +LL | trait LendingIterator: Sized { |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 14 | + |
| 15 | +error[E0308]: mismatched types |
| 16 | + --> $DIR/leaked-vars-issue-122098.rs:10:38 |
| 17 | + | |
| 18 | +LL | LendingIterator::for_each(Query, Box::new); |
| 19 | + | ------------------------- ^^^^^^^^ expected `Box<dyn FnMut(...)>`, found fn item |
| 20 | + | | |
| 21 | + | arguments to this function are incorrect |
| 22 | + | |
| 23 | + = note: expected struct `Box<(dyn for<'a> FnMut(<Query as LendingIterator>::Item<'a>) + 'static)>` |
| 24 | + found fn item `fn(_) -> Box<_> {Box::<_>::new}` |
| 25 | +note: method defined here |
| 26 | + --> $DIR/leaked-vars-issue-122098.rs:5:8 |
| 27 | + | |
| 28 | +LL | fn for_each(self, f: Box<dyn FnMut(Self::Item<'_>)>) {} |
| 29 | + | ^^^^^^^^ --------------------------------- |
| 30 | + |
| 31 | +error[E0277]: the trait bound `Query: LendingIterator` is not satisfied |
| 32 | + --> $DIR/leaked-vars-issue-122098.rs:10:38 |
| 33 | + | |
| 34 | +LL | LendingIterator::for_each(Query, Box::new); |
| 35 | + | ^^^^^^^^ the trait `LendingIterator` is not implemented for `Query` |
| 36 | + | |
| 37 | +help: this trait has no implementations, consider adding one |
| 38 | + --> $DIR/leaked-vars-issue-122098.rs:2:1 |
| 39 | + | |
| 40 | +LL | trait LendingIterator: Sized { |
| 41 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 42 | + |
| 43 | +error: aborting due to 3 previous errors |
| 44 | + |
| 45 | +Some errors have detailed explanations: E0277, E0308. |
| 46 | +For more information about an error, try `rustc --explain E0277`. |
0 commit comments