fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-5216.rs:3:21 3 | 4LL | pub static C: S = S(f); 5 | - ^ expected `Box<dyn FnMut() + Sync>`, found fn item 6 | | 7 | arguments to this struct are incorrect 8 | 9 = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>` 10 found fn item `fn() {f}` 11note: tuple struct defined here 12 --> $DIR/issue-5216.rs:2:8 13 | 14LL | struct S(Box<dyn FnMut() + Sync>); 15 | ^ 16 17error[E0308]: mismatched types 18 --> $DIR/issue-5216.rs:8:19 19 | 20LL | pub static D: T = g; 21 | ^ expected `Box<dyn FnMut() + Sync>`, found fn item 22 | 23 = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>` 24 found fn item `fn() {g}` 25 26error: aborting due to 2 previous errors 27 28For more information about this error, try `rustc --explain E0308`.