2024-11-22 02:31:42 +00:00
|
|
|
error[E0015]: cannot use `for` loop on `std::ops::Range<usize>` in constant functions
|
2021-04-26 12:53:41 +00:00
|
|
|
--> $DIR/const-fn-error.rs:5:14
|
2020-12-28 17:15:16 +00:00
|
|
|
|
|
|
|
|
LL | for i in 0..x {
|
|
|
|
| ^^^^
|
2021-12-09 17:10:05 +00:00
|
|
|
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
2020-12-28 17:15:16 +00:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
error[E0015]: cannot use `for` loop on `std::ops::Range<usize>` in constant functions
|
2021-04-26 12:53:41 +00:00
|
|
|
--> $DIR/const-fn-error.rs:5:14
|
2020-12-28 17:15:16 +00:00
|
|
|
|
|
|
|
|
LL | for i in 0..x {
|
|
|
|
| ^^^^
|
2021-12-09 17:10:05 +00:00
|
|
|
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
2024-11-22 02:31:42 +00:00
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
2020-12-28 17:15:16 +00:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2020-12-28 17:15:16 +00:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
For more information about this error, try `rustc --explain E0015`.
|