]>
Commit | Line | Data |
---|---|---|
94b46f34 | 1 | error[E0658]: let bindings in constant functions are unstable (see issue #48821) |
ff7c6d11 XL |
2 | --> $DIR/const-fn-error.rs:16:19 |
3 | | | |
0531ce1d | 4 | LL | let mut sum = 0; |
ff7c6d11 | 5 | | ^ |
94b46f34 XL |
6 | | |
7 | = help: add #![feature(const_let)] to the crate attributes to enable | |
8 | ||
9 | error[E0658]: statements in constant functions are unstable (see issue #48821) | |
10 | --> $DIR/const-fn-error.rs:16:19 | |
11 | | | |
12 | LL | let mut sum = 0; | |
13 | | ^ | |
14 | | | |
15 | = help: add #![feature(const_let)] to the crate attributes to enable | |
ff7c6d11 | 16 | |
83c7162d | 17 | error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
94b46f34 | 18 | --> $DIR/const-fn-error.rs:19:14 |
ff7c6d11 | 19 | | |
0531ce1d | 20 | LL | for i in 0..x { |
2c00a5a8 | 21 | | ^^^^ |
ff7c6d11 XL |
22 | |
23 | error[E0019]: constant function contains unimplemented expression type | |
94b46f34 | 24 | --> $DIR/const-fn-error.rs:19:14 |
ff7c6d11 | 25 | | |
0531ce1d | 26 | LL | for i in 0..x { |
2c00a5a8 | 27 | | ^^^^ |
ff7c6d11 | 28 | |
94b46f34 XL |
29 | error[E0080]: could not evaluate constant expression |
30 | --> $DIR/const-fn-error.rs:29:13 | |
ff7c6d11 | 31 | | |
0531ce1d | 32 | LL | for i in 0..x { |
94b46f34 | 33 | | ---- calling non-const fn `<I as std::iter::IntoIterator><std::ops::Range<usize>>::into_iter` |
0531ce1d | 34 | ... |
94b46f34 XL |
35 | LL | let a : [i32; f(X)]; //~ ERROR E0080 |
36 | | ^^^^^^----^ | |
37 | | | | |
38 | | inside call to `f` | |
ff7c6d11 | 39 | |
94b46f34 | 40 | error: aborting due to 5 previous errors |
ff7c6d11 | 41 | |
94b46f34 | 42 | Some errors occurred: E0015, E0019, E0080, E0658. |
0531ce1d | 43 | For more information about an error, try `rustc --explain E0015`. |