Files
rust/tests/ui/consts/const-for.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
713 B
Plaintext
Raw Normal View History

2024-11-22 02:31:42 +00:00
error[E0015]: cannot use `for` loop on `std::ops::Range<i32>` in constants
2024-08-17 14:19:34 +02:00
--> $DIR/const-for.rs:4:14
2021-07-29 02:56:03 +02:00
|
LL | for _ in 0..5 {}
| ^^^^
2021-12-10 01:10:05 +08:00
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
2021-07-29 02:56:03 +02:00
2024-11-22 02:31:42 +00:00
error[E0015]: cannot use `for` loop on `std::ops::Range<i32>` in constants
2024-08-17 14:19:34 +02:00
--> $DIR/const-for.rs:4:14
2021-07-29 02:56:03 +02:00
|
LL | for _ in 0..5 {}
| ^^^^
2021-12-10 01:10:05 +08:00
|
= note: calls in constants 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`
2021-07-29 02:56:03 +02:00
2023-04-16 11:12:37 +00:00
error: aborting due to 2 previous errors
2021-07-29 02:56:03 +02:00
2023-04-16 11:12:37 +00:00
For more information about this error, try `rustc --explain E0015`.