fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
881 B24 linesraw
1error[E0658]: `while` is not allowed in a `const`
2  --> $DIR/issue-52475.rs:5:9
3   |
4LL | /         while n < 5 {
5LL | |
6LL | |             n = (n + 1) % 5;
7LL | |             x = &0; // Materialize a new AllocId
8LL | |         }
9   | |_________^
10   |
11   = note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
12   = help: add `#![feature(const_loop)]` to the crate attributes to enable
13   = help: add `#![feature(const_if_match)]` to the crate attributes to enable
14
15error[E0080]: evaluation of constant value failed
16  --> $DIR/issue-52475.rs:7:17
17   |
18LL |             n = (n + 1) % 5;
19   |                 ^^^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
20
21error: aborting due to 2 previous errors
22
23Some errors have detailed explanations: E0080, E0658.
24For more information about an error, try `rustc --explain E0080`.