fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
952 B28 linesraw
1error[E0697]: closures cannot be static
2  --> $DIR/issue-52432.rs:4:12
3   |
4LL |     [(); &(static |x| {}) as *const _ as usize];
5   |            ^^^^^^^^^^
6
7error[E0697]: closures cannot be static
8  --> $DIR/issue-52432.rs:7:12
9   |
10LL |     [(); &(static || {}) as *const _ as usize];
11   |            ^^^^^^^^^
12
13error[E0282]: type annotations needed
14  --> $DIR/issue-52432.rs:4:20
15   |
16LL |     [(); &(static |x| {}) as *const _ as usize];
17   |                    ^ consider giving this closure parameter a type
18
19error[E0080]: evaluation of constant value failed
20  --> $DIR/issue-52432.rs:7:10
21   |
22LL |     [(); &(static || {}) as *const _ as usize];
23   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "pointer-to-integer cast" needs an rfc before being allowed inside constants
24
25error: aborting due to 4 previous errors
26
27Some errors have detailed explanations: E0080, E0282, E0697.
28For more information about an error, try `rustc --explain E0080`.