error[E0308]: mismatched types --> $DIR/issue-86201.rs:6:29 | LL | type FunType = impl Fn<()>; | ----------- the expected opaque type LL | LL | static STATIC_FN: FunType = some_fn; | ^^^^^^^ expected opaque type, found fn item | = note: expected opaque type `impl Fn<()>` found fn item `fn() {some_fn}` error: could not find defining uses --> $DIR/issue-86201.rs:4:16 | LL | type FunType = impl Fn<()>; | ^^^^^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.