]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-fn-error.stderr
New upstream version 1.28.0~beta.14+dfsg1
[rustc.git] / src / test / ui / const-fn-error.stderr
CommitLineData
94b46f34 1error[E0658]: let bindings in constant functions are unstable (see issue #48821)
ff7c6d11
XL
2 --> $DIR/const-fn-error.rs:16:19
3 |
0531ce1d 4LL | let mut sum = 0;
ff7c6d11 5 | ^
94b46f34
XL
6 |
7 = help: add #![feature(const_let)] to the crate attributes to enable
8
9error[E0658]: statements in constant functions are unstable (see issue #48821)
10 --> $DIR/const-fn-error.rs:16:19
11 |
12LL | let mut sum = 0;
13 | ^
14 |
15 = help: add #![feature(const_let)] to the crate attributes to enable
ff7c6d11 16
83c7162d 17error[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 20LL | for i in 0..x {
2c00a5a8 21 | ^^^^
ff7c6d11
XL
22
23error[E0019]: constant function contains unimplemented expression type
94b46f34 24 --> $DIR/const-fn-error.rs:19:14
ff7c6d11 25 |
0531ce1d 26LL | for i in 0..x {
2c00a5a8 27 | ^^^^
ff7c6d11 28
94b46f34
XL
29error[E0080]: could not evaluate constant expression
30 --> $DIR/const-fn-error.rs:29:13
ff7c6d11 31 |
0531ce1d 32LL | 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
35LL | let a : [i32; f(X)]; //~ ERROR E0080
36 | ^^^^^^----^
37 | |
38 | inside call to `f`
ff7c6d11 39
94b46f34 40error: aborting due to 5 previous errors
ff7c6d11 41
94b46f34 42Some errors occurred: E0015, E0019, E0080, E0658.
0531ce1d 43For more information about an error, try `rustc --explain E0015`.