Skip to content

Commit c34fb51

Browse files
committed
Remove origin field from TypeAliasesOpaqueTy
1 parent 5cefdbd commit c34fb51

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
345345
ty,
346346
ImplTraitContext::TypeAliasesOpaqueTy {
347347
capturable_lifetimes: &mut FxHashSet::default(),
348-
origin: hir::OpaqueTyOrigin::TyAlias,
349348
},
350349
);
351350
let generics = self.lower_generics(gen, ImplTraitContext::disallowed());
@@ -918,7 +917,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
918917
ty,
919918
ImplTraitContext::TypeAliasesOpaqueTy {
920919
capturable_lifetimes: &mut FxHashSet::default(),
921-
origin: hir::OpaqueTyOrigin::TyAlias,
922920
},
923921
);
924922
hir::ImplItemKind::TyAlias(ty)

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,6 @@ enum ImplTraitContext<'b, 'a> {
280280
// FIXME(impl_trait): but `required_region_bounds` will ICE later
281281
// anyway.
282282
capturable_lifetimes: &'b mut FxHashSet<hir::LifetimeName>,
283-
/// Origin: OpaqueTyOrigin::TyAlias
284-
origin: hir::OpaqueTyOrigin,
285283
},
286284
/// `impl Trait` is not accepted in this position.
287285
Disallowed(ImplTraitPosition),
@@ -310,8 +308,8 @@ impl<'a> ImplTraitContext<'_, 'a> {
310308
ReturnPositionOpaqueTy { fn_def_id, origin } => {
311309
ReturnPositionOpaqueTy { fn_def_id: *fn_def_id, origin: *origin }
312310
}
313-
TypeAliasesOpaqueTy { capturable_lifetimes, origin } => {
314-
TypeAliasesOpaqueTy { capturable_lifetimes, origin: *origin }
311+
TypeAliasesOpaqueTy { capturable_lifetimes } => {
312+
TypeAliasesOpaqueTy { capturable_lifetimes }
315313
}
316314
Disallowed(pos) => Disallowed(*pos),
317315
}
@@ -1152,7 +1150,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11521150
true,
11531151
ImplTraitContext::TypeAliasesOpaqueTy {
11541152
capturable_lifetimes: &mut capturable_lifetimes,
1155-
origin: hir::OpaqueTyOrigin::TyAlias,
11561153
},
11571154
)
11581155
}
@@ -1416,18 +1413,17 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14161413
None,
14171414
|this| this.lower_param_bounds(bounds, itctx),
14181415
),
1419-
ImplTraitContext::TypeAliasesOpaqueTy { ref capturable_lifetimes, origin } => {
1416+
ImplTraitContext::TypeAliasesOpaqueTy { ref capturable_lifetimes } => {
14201417
// Reset capturable lifetimes, any nested impl trait
14211418
// types will inherit lifetimes from this opaque type,
14221419
// so don't need to capture them again.
14231420
let nested_itctx = ImplTraitContext::TypeAliasesOpaqueTy {
14241421
capturable_lifetimes: &mut FxHashSet::default(),
1425-
origin,
14261422
};
14271423
self.lower_opaque_impl_trait(
14281424
span,
14291425
None,
1430-
origin,
1426+
hir::OpaqueTyOrigin::TyAlias,
14311427
def_node_id,
14321428
Some(capturable_lifetimes),
14331429
|this| this.lower_param_bounds(bounds, nested_itctx),

0 commit comments

Comments
 (0)