2021-12-09 11:10:05 -06:00
|
|
|
error[E0015]: cannot convert `std::ops::Range<i32>` into an iterator in constants
|
2024-08-17 07:19:34 -05:00
|
|
|
--> $DIR/const-for.rs:4:14
|
2021-07-28 19:56:03 -05:00
|
|
|
|
|
|
|
|
LL | for _ in 0..5 {}
|
|
|
|
| ^^^^
|
2021-12-09 11:10:05 -06:00
|
|
|
|
|
|
|
|
note: impl defined here, but it is not `const`
|
|
|
|
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
|
|
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
|
2024-03-07 16:09:00 -06:00
|
|
|
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
|
LL + #![feature(const_trait_impl)]
|
|
|
|
|
|
2021-07-28 19:56:03 -05:00
|
|
|
|
2021-12-09 11:10:05 -06:00
|
|
|
error[E0015]: cannot call non-const fn `<std::ops::Range<i32> as Iterator>::next` in constants
|
2024-08-17 07:19:34 -05:00
|
|
|
--> $DIR/const-for.rs:4:14
|
2021-07-28 19:56:03 -05:00
|
|
|
|
|
|
|
|
LL | for _ in 0..5 {}
|
|
|
|
| ^^^^
|
2021-12-09 11:10:05 -06:00
|
|
|
|
|
|
|
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
|
2024-03-07 16:09:00 -06:00
|
|
|
help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
|
LL + #![feature(const_trait_impl)]
|
|
|
|
|
|
2021-07-28 19:56:03 -05:00
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2021-07-28 19:56:03 -05:00
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
For more information about this error, try `rustc --explain E0015`.
|