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