summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issues/issue-70877.stderr
blob: 3ef7087b08a10f39230ba3a1059c3a8f5ca55503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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:9:12
   |
LL | type FooRet = impl std::fmt::Debug;
   |               -------------------- the expected opaque type
...
LL | type Foo = impl Iterator<Item = FooItem>;
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found enum `Option`
   |
   = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>`
              found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0271`.