|
| 1 | +error[E0277]: the trait bound `(): LendingIterator` is not satisfied |
| 2 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:32:31 |
| 3 | + | |
| 4 | +LL | LendingIterator::for_each(&(), f); |
| 5 | + | ------------------------- ^^^ the trait `LendingIterator` is not implemented for `()` |
| 6 | + | | |
| 7 | + | required by a bound introduced by this call |
| 8 | + | |
| 9 | +help: this trait has no implementations, consider adding one |
| 10 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:24:1 |
| 11 | + | |
| 12 | +LL | trait LendingIterator { |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 14 | + |
| 15 | +error[E0308]: mismatched types |
| 16 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:32:36 |
| 17 | + | |
| 18 | +LL | LendingIterator::for_each(&(), f); |
| 19 | + | ------------------------- ^ expected `Box<fn(...)>`, found fn item |
| 20 | + | | |
| 21 | + | arguments to this function are incorrect |
| 22 | + | |
| 23 | + = note: expected struct `Box<for<'a> fn(<() as LendingIterator>::Item<'a>)>` |
| 24 | + found fn item `fn(()) {f}` |
| 25 | +note: method defined here |
| 26 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:26:8 |
| 27 | + | |
| 28 | +LL | fn for_each(&self, _f: Box<fn(Self::Item<'_>)>) {} |
| 29 | + | ^^^^^^^^ --------------------------- |
| 30 | + |
| 31 | +error[E0277]: the trait bound `(): LendingIterator` is not satisfied |
| 32 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:32:36 |
| 33 | + | |
| 34 | +LL | LendingIterator::for_each(&(), f); |
| 35 | + | ^ the trait `LendingIterator` is not implemented for `()` |
| 36 | + | |
| 37 | +help: this trait has no implementations, consider adding one |
| 38 | + --> $DIR/hr_alias_normalization_leaking_vars.rs:24:1 |
| 39 | + | |
| 40 | +LL | trait LendingIterator { |
| 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