rust/src/test/ui/consts/const-fn-error.stderr
2018-10-25 16:46:19 +02:00

41 lines
1.3 KiB
Text

error[E0658]: let bindings in constant functions are unstable (see issue #48821)
--> $DIR/const-fn-error.rs:16:19
|
LL | let mut sum = 0;
| ^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0658]: statements in constant functions are unstable (see issue #48821)
--> $DIR/const-fn-error.rs:16:19
|
LL | let mut sum = 0;
| ^
|
= help: add #![feature(const_let)] to the crate attributes to enable
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
--> $DIR/const-fn-error.rs:19:14
|
LL | for i in 0..x { //~ ERROR E0080
| ^^^^
error[E0019]: constant function contains unimplemented expression type
--> $DIR/const-fn-error.rs:19:14
|
LL | for i in 0..x { //~ ERROR E0080
| ^^^^
error[E0080]: evaluation of constant value failed
--> $DIR/const-fn-error.rs:19:14
|
LL | for i in 0..x { //~ ERROR E0080
| ^^^^ calling non-const fn `<I as std::iter::IntoIterator><std::ops::Range<usize>>::into_iter`
...
LL | let a : [i32; f(X)];
| ---- inside call to `f`
error: aborting due to 5 previous errors
Some errors occurred: E0015, E0019, E0080, E0658.
For more information about an error, try `rustc --explain E0015`.