fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
687 B21 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-5216.rs:3:21
3   |
4LL | pub static C: S = S(f);
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
10error[E0308]: mismatched types
11  --> $DIR/issue-5216.rs:8:19
12   |
13LL | pub static D: T = g;
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
19error: aborting due to 2 previous errors
20
21For more information about this error, try `rustc --explain E0308`.