File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed 
clippy_lints/src/transmute Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,6 @@ pub(super) fn check_cast<'tcx>(
3737    let  inherited = Inherited :: new ( cx. tcx ,  local_def_id) ; 
3838    let  fn_ctxt = FnCtxt :: new ( & inherited,  cx. param_env ,  local_def_id) ; 
3939
40-     // If we already have errors, we can't be sure we can pointer cast. 
41-     assert ! ( 
42-         !fn_ctxt. errors_reported_since_creation( ) , 
43-         "Newly created FnCtxt contained errors" 
44-     ) ; 
45- 
4640    if  let  Ok ( check)  = cast:: CastCheck :: new ( 
4741        & fn_ctxt, 
4842        e, 
@@ -53,17 +47,7 @@ pub(super) fn check_cast<'tcx>(
5347        DUMMY_SP , 
5448        hir:: Constness :: NotConst , 
5549    )  { 
56-         let  res = check. do_check ( & fn_ctxt) ; 
57- 
58-         // do_check's documentation says that it might return Ok and create 
59-         // errors in the fcx instead of returning Err in some cases. Those cases 
60-         // should be filtered out before getting here. 
61-         assert ! ( 
62-             !fn_ctxt. errors_reported_since_creation( ) , 
63-             "`fn_ctxt` contained errors after cast check!" 
64-         ) ; 
65- 
66-         res. ok ( ) 
50+         check. do_check ( & fn_ctxt) . ok ( ) 
6751    }  else  { 
6852        None 
6953    } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments