Skip to content

Commit b4d3fa4

Browse files
Remove ParamMode::ExplicitNamed
1 parent 22572d0 commit b4d3fa4

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

Diff for: compiler/rustc_ast_lowering/src/item.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -764,18 +764,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
764764
&mut self,
765765
(index, f): (usize, &FieldDef),
766766
) -> hir::FieldDef<'hir> {
767-
let ty = if let TyKind::Path(qself, path) = &f.ty.kind {
768-
let t = self.lower_path_ty(
769-
&f.ty,
770-
qself,
771-
path,
772-
ParamMode::ExplicitNamed, // no `'_` in declarations (Issue #61124)
773-
ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy),
774-
);
775-
self.arena.alloc(t)
776-
} else {
777-
self.lower_ty(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy))
778-
};
767+
let ty = self.lower_ty(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy));
779768
let hir_id = self.lower_node_id(f.id);
780769
self.lower_attrs(hir_id, &f.attrs);
781770
hir::FieldDef {

Diff for: compiler/rustc_ast_lowering/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,6 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
481481
enum ParamMode {
482482
/// Any path in a type context.
483483
Explicit,
484-
/// Path in a type definition, where the anonymous lifetime `'_` is not allowed.
485-
ExplicitNamed,
486484
/// The `module::Type` in `module::Type::method` in an expression.
487485
Optional,
488486
}

0 commit comments

Comments
 (0)