Skip to content

Commit b48ee78

Browse files
authored
Unrolled build for rust-lang#129626
Rollup merge of rust-lang#129626 - compiler-errors:explicit-named, r=fmease Remove `ParamMode::ExplicitNamed` This was introduced as a hack to improve a diagnostics suggestion in rust-lang#61679. It was subsequently broken, but also it was an incomplete hack that I don't believe we need to support, so let's just remove it.
2 parents 515395a + b4d3fa4 commit b48ee78

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 12 deletions
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 {

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 0 additions & 2 deletions
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)