| error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>` |
| --> $DIR/issue-70877.rs:11:12 |
| | |
| LL | type FooRet = impl std::fmt::Debug; |
| | -------------------- the found opaque type |
| ... |
| LL | type Foo = impl Iterator<Item = FooItem>; |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type |
| | |
| = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>` |
| found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>` |
| |
| error: aborting due to previous error |
| |
| For more information about this error, try `rustc --explain E0271`. |