summary refs log tree commit diff
path: root/src/test/ui/impl-trait/issues/issue-70877.stderr
blob: fe48e92da5eacc7d44c4a758f24b0413679c0cd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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:7:12
   |
LL | type FooRet = impl std::fmt::Debug;
   |               -------------------- the found opaque type
...
LL | type Foo = impl Iterator<Item = FooItem>;
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
   |
note: expected this to be `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
  --> $DIR/issue-70877.rs:13:17
   |
LL |     type Item = FooItem;
   |                 ^^^^^^^
   = 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`.