@@ -380,7 +380,6 @@ impl<'tcx> InferCtxt<'tcx> {
380
380
span : Span ,
381
381
param_env : ty:: ParamEnv < ' tcx > ,
382
382
) -> Option < OpaqueTyOrigin > {
383
- let opaque_hir_id = self . tcx . hir ( ) . local_def_id_to_hir_id ( def_id) ;
384
383
let parent_def_id = match self . defining_use_anchor {
385
384
DefiningAnchor :: Bubble | DefiningAnchor :: Error => return None ,
386
385
DefiningAnchor :: Bind ( bind) => bind,
@@ -402,7 +401,7 @@ impl<'tcx> InferCtxt<'tcx> {
402
401
hir:: OpaqueTyOrigin :: FnReturn ( parent) => parent == parent_def_id,
403
402
// Named `type Foo = impl Bar;`
404
403
hir:: OpaqueTyOrigin :: TyAlias => {
405
- may_define_opaque_type ( self . tcx , parent_def_id, opaque_hir_id , def_id, param_env)
404
+ may_define_opaque_type ( self . tcx , parent_def_id, def_id, param_env)
406
405
}
407
406
} ;
408
407
trace ! ( ?origin) ;
@@ -650,10 +649,10 @@ impl<'tcx> InferCtxt<'tcx> {
650
649
fn may_define_opaque_type < ' tcx > (
651
650
tcx : TyCtxt < ' tcx > ,
652
651
def_id : LocalDefId ,
653
- opaque_hir_id : hir:: HirId ,
654
652
opaque_def_id : LocalDefId ,
655
653
param_env : ty:: ParamEnv < ' tcx > ,
656
654
) -> bool {
655
+ let opaque_hir_id = tcx. hir ( ) . local_def_id_to_hir_id ( opaque_def_id) ;
657
656
let mut hir_id = tcx. hir ( ) . local_def_id_to_hir_id ( def_id) ;
658
657
659
658
// Named opaque types can be defined by any siblings or children of siblings.
0 commit comments