fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
524 B16 linesraw
1error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
2  --> $DIR/const-call.rs:6:17
3   |
4LL |     let _ = [0; f(2)];
5   |                 ^^^^
6
7error[E0080]: evaluation of constant value failed
8  --> $DIR/const-call.rs:6:17
9   |
10LL |     let _ = [0; f(2)];
11   |                 ^^^^ calling non-const function `f`
12
13error: aborting due to 2 previous errors
14
15Some errors have detailed explanations: E0015, E0080.
16For more information about an error, try `rustc --explain E0015`.