]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-5216.stderr
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-5216.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-5216.rs:3:21
3    |
4 LL | pub static C: S = S(f); //~ ERROR mismatched types
5    |                     ^ expected struct `std::boxed::Box`, found fn item
6    |
7    = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
8               found type `fn() {f}`
9
10 error[E0308]: mismatched types
11   --> $DIR/issue-5216.rs:8:19
12    |
13 LL | pub static D: T = g; //~ ERROR mismatched types
14    |                   ^ expected struct `std::boxed::Box`, found fn item
15    |
16    = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
17               found type `fn() {g}`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.