@@ -9,7 +9,6 @@ use rustc_errors::ErrorGuaranteed;
9
9
use rustc_hir:: intravisit:: { self , InferKind , Visitor } ;
10
10
use rustc_hir:: { self as hir, AmbigArg , HirId } ;
11
11
use rustc_infer:: traits:: solve:: Goal ;
12
- use rustc_middle:: span_bug;
13
12
use rustc_middle:: traits:: ObligationCause ;
14
13
use rustc_middle:: ty:: adjustment:: { Adjust , Adjustment , PointerCoercion } ;
15
14
use rustc_middle:: ty:: {
@@ -513,15 +512,6 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
513
512
self . typeck_results . user_provided_types_mut ( ) . extend (
514
513
fcx_typeck_results. user_provided_types ( ) . items ( ) . map ( |( local_id, c_ty) | {
515
514
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
-
525
515
( hir_id, * c_ty)
526
516
} ) ,
527
517
) ;
@@ -532,17 +522,7 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
532
522
assert_eq ! ( fcx_typeck_results. hir_owner, self . typeck_results. hir_owner) ;
533
523
534
524
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) ) ,
546
526
) ;
547
527
}
548
528
0 commit comments