]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-for.stderr
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / const-for.stderr
1 error[E0015]: cannot convert `std::ops::Range<i32>` into an iterator in constants
2   --> $DIR/const-for.rs:5:14
3    |
4 LL |     for _ in 0..5 {}
5    |              ^^^^
6    |
7 note: impl defined here, but it is not `const`
8   --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
9    |
10 LL | impl<I: Iterator> IntoIterator for I {
11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
13
14 error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
15   --> $DIR/const-for.rs:5:14
16    |
17 LL |     for _ in 0..5 {}
18    |              ^^^^
19    |
20    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0015`.