]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-for.stderr
Rollup merge of #106951 - tmiasko:rm-simplify-initial, r=oli-obk
[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    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
11
12 error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
13   --> $DIR/const-for.rs:5:14
14    |
15 LL |     for _ in 0..5 {}
16    |              ^^^^
17    |
18    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
19    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0015`.