File tree Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 1
1
error[E0080]: evaluation of constant value failed
2
- --> $DIR/infinite_loop.rs:6:15
2
+ --> $DIR/infinite_loop.rs:6:9
3
3
|
4
- LL | while n != 0 {
5
- | ^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
4
+ LL | / while n != 0 {
5
+ LL | |
6
+ LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
7
+ LL | | }
8
+ | |_________^ exceeded interpreter step limit (see `#[const_eval_limit]`)
6
9
7
10
error: aborting due to previous error
8
11
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ fn main() {
2
2
let _ = [ ( ) ; {
3
3
let mut x = & 0 ;
4
4
let mut n = 0 ;
5
- while n < 5 {
6
- n = ( n + 1 ) % 5 ; //~ ERROR evaluation of constant value failed
5
+ while n < 5 { //~ ERROR evaluation of constant value failed [E0080]
6
+ n = ( n + 1 ) % 5 ;
7
7
x = & 0 ; // Materialize a new AllocId
8
8
}
9
9
0
Original file line number Diff line number Diff line change 1
1
error[E0080]: evaluation of constant value failed
2
- --> $DIR/issue-52475.rs:6:17
2
+ --> $DIR/issue-52475.rs:5:9
3
3
|
4
- LL | n = (n + 1) % 5;
5
- | ^^^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
4
+ LL | / while n < 5 {
5
+ LL | | n = (n + 1) % 5;
6
+ LL | | x = &0; // Materialize a new AllocId
7
+ LL | | }
8
+ | |_________^ exceeded interpreter step limit (see `#[const_eval_limit]`)
6
9
7
10
error: aborting due to previous error
8
11
Original file line number Diff line number Diff line change 1
1
error[E0080]: evaluation of constant value failed
2
- --> $DIR/const_eval_limit_reached.rs:6:11
2
+ --> $DIR/const_eval_limit_reached.rs:6:5
3
3
|
4
- LL | while x != 1000 {
5
- | ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
4
+ LL | / while x != 1000 {
5
+ LL | |
6
+ LL | | x += 1;
7
+ LL | | }
8
+ | |_____^ exceeded interpreter step limit (see `#[const_eval_limit]`)
6
9
7
10
error: aborting due to previous error
8
11
You can’t perform that action at this time.
0 commit comments