@@ -280,8 +280,6 @@ enum ImplTraitContext<'b, 'a> {
280
280
// FIXME(impl_trait): but `required_region_bounds` will ICE later
281
281
// anyway.
282
282
capturable_lifetimes : & ' b mut FxHashSet < hir:: LifetimeName > ,
283
- /// Origin: OpaqueTyOrigin::TyAlias
284
- origin : hir:: OpaqueTyOrigin ,
285
283
} ,
286
284
/// `impl Trait` is not accepted in this position.
287
285
Disallowed ( ImplTraitPosition ) ,
@@ -310,8 +308,8 @@ impl<'a> ImplTraitContext<'_, 'a> {
310
308
ReturnPositionOpaqueTy { fn_def_id, origin } => {
311
309
ReturnPositionOpaqueTy { fn_def_id : * fn_def_id, origin : * origin }
312
310
}
313
- TypeAliasesOpaqueTy { capturable_lifetimes, origin } => {
314
- TypeAliasesOpaqueTy { capturable_lifetimes, origin : * origin }
311
+ TypeAliasesOpaqueTy { capturable_lifetimes } => {
312
+ TypeAliasesOpaqueTy { capturable_lifetimes }
315
313
}
316
314
Disallowed ( pos) => Disallowed ( * pos) ,
317
315
}
@@ -1152,7 +1150,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1152
1150
true ,
1153
1151
ImplTraitContext :: TypeAliasesOpaqueTy {
1154
1152
capturable_lifetimes : & mut capturable_lifetimes,
1155
- origin : hir:: OpaqueTyOrigin :: TyAlias ,
1156
1153
} ,
1157
1154
)
1158
1155
}
@@ -1416,18 +1413,17 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1416
1413
None ,
1417
1414
|this| this. lower_param_bounds ( bounds, itctx) ,
1418
1415
) ,
1419
- ImplTraitContext :: TypeAliasesOpaqueTy { ref capturable_lifetimes, origin } => {
1416
+ ImplTraitContext :: TypeAliasesOpaqueTy { ref capturable_lifetimes } => {
1420
1417
// Reset capturable lifetimes, any nested impl trait
1421
1418
// types will inherit lifetimes from this opaque type,
1422
1419
// so don't need to capture them again.
1423
1420
let nested_itctx = ImplTraitContext :: TypeAliasesOpaqueTy {
1424
1421
capturable_lifetimes : & mut FxHashSet :: default ( ) ,
1425
- origin,
1426
1422
} ;
1427
1423
self . lower_opaque_impl_trait (
1428
1424
span,
1429
1425
None ,
1430
- origin ,
1426
+ hir :: OpaqueTyOrigin :: TyAlias ,
1431
1427
def_node_id,
1432
1428
Some ( capturable_lifetimes) ,
1433
1429
|this| this. lower_param_bounds ( bounds, nested_itctx) ,
0 commit comments