rust/tests/ui/consts/const-fn-error.stderr

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

21 lines
761 B
Plaintext
Raw Normal View History

2024-11-22 02:31:42 +00:00
error[E0015]: cannot use `for` loop on `std::ops::Range<usize>` in constant functions
--> $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
--> $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`.