1 error[E0308]: mismatched types
2 --> $DIR/issue-5216.rs:13:21
4 LL | pub static C: S = S(f); //~ ERROR mismatched types
5 | ^ expected struct `std::boxed::Box`, found fn item
7 = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
10 error[E0308]: mismatched types
11 --> $DIR/issue-5216.rs:18:19
13 LL | pub static D: T = g; //~ ERROR mismatched types
14 | ^ expected struct `std::boxed::Box`, found fn item
16 = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
19 error: aborting due to 2 previous errors
21 For more information about this error, try `rustc --explain E0308`.