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 | arguments to this struct are incorrect
9 = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>`
10 found fn item `fn() {f}`
11 note: tuple struct defined here
12 --> $DIR/issue-5216.rs:2:8
14 LL | struct S(Box<dyn FnMut() + Sync>);
17 error[E0308]: mismatched types
18 --> $DIR/issue-5216.rs:8:19
20 LL | pub static D: T = g;
21 | ^ expected struct `Box`, found fn item
23 = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>`
24 found fn item `fn() {g}`
26 error: aborting due to 2 previous errors
28 For more information about this error, try `rustc --explain E0308`.