File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed 
compiler/rustc_hir_analysis/src/hir_ty_lowering Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -2262,18 +2262,11 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
22622262            _ => None , 
22632263        } ; 
22642264
2265-         if  let  Some ( lit_input)  = lit_input { 
2266-             // If an error occurred, ignore that it's a literal and leave reporting the error up to 
2267-             // mir. 
2268- 
2265+         lit_input
22692266            // Allow the `ty` to be an alias type, though we cannot handle it here, we just go through 
22702267            // the more expensive anon const code path. 
2271-             if  !lit_input. ty . has_aliases ( )  { 
2272-                 return  Some ( tcx. at ( expr. span ) . lit_to_const ( lit_input) ) ; 
2273-             } 
2274-         } 
2275- 
2276-         None 
2268+             . filter ( |l| !l. ty . has_aliases ( ) ) 
2269+             . map ( |l| tcx. at ( expr. span ) . lit_to_const ( l) ) 
22772270    } 
22782271
22792272    fn  lower_delegation_ty ( & self ,  idx :  hir:: InferDelegationKind )  -> Ty < ' tcx >  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments