mirror of https://github.com/rust-lang/rust.git
Bless and update consts tests
This commit is contained in:
parent
aae331d610
commit
75b7c6c8ec
|
@ -1,8 +1,11 @@
|
||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/infinite_loop.rs:6:15
|
--> $DIR/infinite_loop.rs:6:9
|
||||||
|
|
|
|
||||||
LL | while n != 0 {
|
LL | / while n != 0 {
|
||||||
| ^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
LL | |
|
||||||
|
LL | | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
|
||||||
|
LL | | }
|
||||||
|
| |_________^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ fn main() {
|
||||||
let _ = [(); {
|
let _ = [(); {
|
||||||
let mut x = &0;
|
let mut x = &0;
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
while n < 5 {
|
while n < 5 { //~ ERROR evaluation of constant value failed [E0080]
|
||||||
n = (n + 1) % 5; //~ ERROR evaluation of constant value failed
|
n = (n + 1) % 5;
|
||||||
x = &0; // Materialize a new AllocId
|
x = &0; // Materialize a new AllocId
|
||||||
}
|
}
|
||||||
0
|
0
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/issue-52475.rs:6:17
|
--> $DIR/issue-52475.rs:5:9
|
||||||
|
|
|
|
||||||
LL | n = (n + 1) % 5;
|
LL | / while n < 5 {
|
||||||
| ^^^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
LL | | n = (n + 1) % 5;
|
||||||
|
LL | | x = &0; // Materialize a new AllocId
|
||||||
|
LL | | }
|
||||||
|
| |_________^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
error[E0080]: evaluation of constant value failed
|
error[E0080]: evaluation of constant value failed
|
||||||
--> $DIR/const_eval_limit_reached.rs:6:11
|
--> $DIR/const_eval_limit_reached.rs:6:5
|
||||||
|
|
|
|
||||||
LL | while x != 1000 {
|
LL | / while x != 1000 {
|
||||||
| ^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
LL | |
|
||||||
|
LL | | x += 1;
|
||||||
|
LL | | }
|
||||||
|
| |_____^ exceeded interpreter step limit (see `#[const_eval_limit]`)
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue