rust/tests/ui/higher-ranked/trait-bounds/hang-on-deeply-nested-dyn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-12-05 22:42:06 -06:00
error[E0308]: mismatched types
2023-07-25 06:08:44 -05:00
--> $DIR/hang-on-deeply-nested-dyn.rs:12:5
2022-12-05 22:42:06 -06:00
|
LL | ) -> &dyn Fn(
| ______-
LL | | &dyn Fn(
LL | | &dyn Fn(
LL | | &dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(&dyn Fn(u32))))))))),
LL | | ),
LL | | ),
LL | | ) {
| |_- expected `&dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn Fn(u32) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a))` because of return type
LL | f
| ^ expected `&dyn Fn(&dyn Fn(&dyn Fn(&...)))`, found `&dyn Fn(u32)`
2022-12-05 22:42:06 -06:00
|
2023-07-25 06:08:44 -05:00
= note: expected reference `&dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn for<'a> Fn(&'a (dyn Fn(u32) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a)) + 'a))`
2022-12-05 22:42:06 -06:00
found reference `&dyn Fn(u32)`
error: aborting due to 1 previous error
2022-12-05 22:42:06 -06:00
For more information about this error, try `rustc --explain E0308`.