File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed 
compiler/rustc_middle/src/middle 
src/test/ui/consts/const-eval Expand file tree Collapse file tree 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) {
3838            tcx. hir ( ) . krate_attrs ( ) , 
3939            tcx. sess , 
4040            sym:: const_eval_limit, 
41-             1_000_000 , 
41+             2_000_000 , 
4242        ) , 
4343    } 
4444} 
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ fn main() {
44    let  _ = [ ( ) ;  { 
55        let  mut  n = 113383 ;  // #20 in https://oeis.org/A006884 
66        while  n != 0  { 
7-             n = if  n % 2  == 0  {  n/2  }  else  {  3 * n + 1  } ; 
87            //~^ ERROR evaluation of constant value failed 
8+             n = if  n % 2  == 0  {  n/2  }  else  {  3 * n + 1  } ; 
99        } 
1010        n
1111    } ] ; 
Original file line number Diff line number Diff line change 11error[E0080]: evaluation of constant value failed
2-   --> $DIR/infinite_loop.rs:7:20 
2+   --> $DIR/infinite_loop.rs:6:15 
33   |
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]`)
66
77error: aborting due to previous error
88
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments