]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-for.stderr
suggest fix for attempted integer identifier in patterns
[rust.git] / tests / 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    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
10
11 error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
12   --> $DIR/const-for.rs:5:14
13    |
14 LL |     for _ in 0..5 {}
15    |              ^^^^
16    |
17    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0015`.