]> git.proxmox.com Git - rustc.git/blob - tests/ui/type-alias-impl-trait/issue-98608.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / type-alias-impl-trait / issue-98608.stderr
1 error[E0271]: expected `fn() -> impl Sized {hi}` to be a fn item that returns `Box<u8>`, but it returns `impl Sized`
2 --> $DIR/issue-98608.rs:6:39
3 |
4 LL | fn hi() -> impl Sized {
5 | ---------- the found opaque type
6 ...
7 LL | let b: Box<dyn Fn() -> Box<u8>> = Box::new(hi);
8 | ^^^^^^^^^^^^ expected struct `Box`, found opaque type
9 |
10 = note: expected struct `Box<u8>`
11 found opaque type `impl Sized`
12 = note: required for the cast from `fn() -> impl Sized {hi}` to the object type `dyn Fn() -> Box<u8>`
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0271`.