@@ -286,7 +286,7 @@ fn orphan_check<'tcx>(
286
286
tcx : TyCtxt < ' tcx > ,
287
287
impl_def_id : LocalDefId ,
288
288
mode : OrphanCheckMode ,
289
- ) -> Result < ( ) , OrphanCheckErr < ' tcx , FxIndexSet < DefId > > > {
289
+ ) -> Result < ( ) , OrphanCheckErr < TyCtxt < ' tcx > , FxIndexSet < DefId > > > {
290
290
// We only accept this routine to be invoked on implementations
291
291
// of a trait, not inherent implementations.
292
292
let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) ;
@@ -326,17 +326,16 @@ fn orphan_check<'tcx>(
326
326
ty
327
327
} ;
328
328
329
- Ok ( ty)
329
+ Ok :: < _ , ! > ( ty)
330
330
} ;
331
331
332
- let Ok ( result) = traits:: orphan_check_trait_ref :: < ! > (
332
+ let result = traits:: orphan_check_trait_ref (
333
333
& infcx,
334
334
trait_ref,
335
335
traits:: InCrate :: Local { mode } ,
336
336
lazily_normalize_ty,
337
- ) else {
338
- unreachable ! ( )
339
- } ;
337
+ )
338
+ . into_ok ( ) ;
340
339
341
340
// (2) Try to map the remaining inference vars back to generic params.
342
341
result. map_err ( |err| match err {
@@ -369,7 +368,7 @@ fn emit_orphan_check_error<'tcx>(
369
368
tcx : TyCtxt < ' tcx > ,
370
369
trait_ref : ty:: TraitRef < ' tcx > ,
371
370
impl_def_id : LocalDefId ,
372
- err : traits:: OrphanCheckErr < ' tcx , FxIndexSet < DefId > > ,
371
+ err : traits:: OrphanCheckErr < TyCtxt < ' tcx > , FxIndexSet < DefId > > ,
373
372
) -> ErrorGuaranteed {
374
373
match err {
375
374
traits:: OrphanCheckErr :: NonLocalInputType ( tys) => {
@@ -482,7 +481,7 @@ fn emit_orphan_check_error<'tcx>(
482
481
483
482
fn lint_uncovered_ty_params < ' tcx > (
484
483
tcx : TyCtxt < ' tcx > ,
485
- UncoveredTyParams { uncovered, local_ty } : UncoveredTyParams < ' tcx , FxIndexSet < DefId > > ,
484
+ UncoveredTyParams { uncovered, local_ty } : UncoveredTyParams < TyCtxt < ' tcx > , FxIndexSet < DefId > > ,
486
485
impl_def_id : LocalDefId ,
487
486
) {
488
487
let hir_id = tcx. local_def_id_to_hir_id ( impl_def_id) ;
0 commit comments