@@ -9,7 +9,6 @@ use rustc_errors::ErrorGuaranteed;
99use rustc_hir:: intravisit:: { self , InferKind , Visitor } ;
1010use rustc_hir:: { self as hir, AmbigArg , HirId } ;
1111use rustc_infer:: traits:: solve:: Goal ;
12- use rustc_middle:: span_bug;
1312use rustc_middle:: traits:: ObligationCause ;
1413use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , PointerCoercion } ;
1514use rustc_middle:: ty:: {
@@ -513,15 +512,6 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
513512 self . typeck_results . user_provided_types_mut ( ) . extend (
514513 fcx_typeck_results. user_provided_types ( ) . items ( ) . map ( |( local_id, c_ty) | {
515514 let hir_id = HirId { owner : common_hir_owner, local_id } ;
516-
517- if cfg ! ( debug_assertions) && c_ty. has_infer ( ) {
518- span_bug ! (
519- hir_id. to_span( self . fcx. tcx) ,
520- "writeback: `{:?}` has inference variables" ,
521- c_ty
522- ) ;
523- } ;
524-
525515 ( hir_id, * c_ty)
526516 } ) ,
527517 ) ;
@@ -532,17 +522,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
532522 assert_eq ! ( fcx_typeck_results. hir_owner, self . typeck_results. hir_owner) ;
533523
534524 self . typeck_results . user_provided_sigs . extend_unord (
535- fcx_typeck_results. user_provided_sigs . items ( ) . map ( |( & def_id, c_sig) | {
536- if cfg ! ( debug_assertions) && c_sig. has_infer ( ) {
537- span_bug ! (
538- self . fcx. tcx. def_span( def_id) ,
539- "writeback: `{:?}` has inference variables" ,
540- c_sig
541- ) ;
542- } ;
543-
544- ( def_id, * c_sig)
545- } ) ,
525+ fcx_typeck_results. user_provided_sigs . items ( ) . map ( |( def_id, c_sig) | ( * def_id, * c_sig) ) ,
546526 ) ;
547527 }
548528
0 commit comments