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
4 LL | fn hi() -> impl Sized {
5 | ---------- the found opaque type
7 LL | let b: Box<dyn Fn() -> Box<u8>> = Box::new(hi);
8 | ^^^^^^^^^^^^ expected struct `Box`, found opaque type
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>`
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0271`.