]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-70877.stderr
Rollup merge of #92021 - woodenarrow:br_single_fp_element, r=Mark-Simulacrum
[rust.git] / src / test / ui / impl-trait / issues / issue-70877.stderr
1 error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
2   --> $DIR/issue-70877.rs:7:12
3    |
4 LL | type FooRet = impl std::fmt::Debug;
5    |               -------------------- the found opaque type
6 ...
7 LL | type Foo = impl Iterator<Item = FooItem>;
8    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
9    |
10 note: expected this to be `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
11   --> $DIR/issue-70877.rs:13:17
12    |
13 LL |     type Item = FooItem;
14    |                 ^^^^^^^
15    = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
16               found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>`
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0271`.