File tree 3 files changed +5
-5
lines changed
compiler/rustc_middle/src/middle
src/test/ui/consts/const-eval
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ pub fn provide(providers: &mut ty::query::Providers) {
38
38
tcx. hir ( ) . krate_attrs ( ) ,
39
39
tcx. sess ,
40
40
sym:: const_eval_limit,
41
- 1_000_000 ,
41
+ 2_000_000 ,
42
42
) ,
43
43
}
44
44
}
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ fn main() {
4
4
let _ = [ ( ) ; {
5
5
let mut n = 113383 ; // #20 in https://oeis.org/A006884
6
6
while n != 0 {
7
- n = if n % 2 == 0 { n/2 } else { 3 * n + 1 } ;
8
7
//~^ ERROR evaluation of constant value failed
8
+ n = if n % 2 == 0 { n/2 } else { 3 * n + 1 } ;
9
9
}
10
10
n
11
11
} ] ;
Original file line number Diff line number Diff line change 1
1
error[E0080]: evaluation of constant value failed
2
- --> $DIR/infinite_loop.rs:7:20
2
+ --> $DIR/infinite_loop.rs:6:15
3
3
|
4
- LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
5
- | ^^^^ ^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
4
+ LL | while n != 0 {
5
+ | ^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
6
6
7
7
error: aborting due to previous error
8
8
You can’t perform that action at this time.
0 commit comments