diff options
| author | Michael Goulet <michael@errs.io> | 2024-08-26 14:41:21 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-08-26 16:47:52 -0400 |
| commit | b4d3fa4829c5366d1b7837f0d73c67def517b66d (patch) | |
| tree | b8e32f98b4c0ca1a84498734155615362cd10c00 | |
| parent | 22572d0994593197593e2a1b7b18d720a9a349a7 (diff) | |
| download | rust-b4d3fa4829c5366d1b7837f0d73c67def517b66d.tar.gz rust-b4d3fa4829c5366d1b7837f0d73c67def517b66d.zip | |
Remove ParamMode::ExplicitNamed
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index eef87879c24..258a6cdf60e 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -764,18 +764,7 @@ impl<'hir> LoweringContext<'_, 'hir> { &mut self, (index, f): (usize, &FieldDef), ) -> hir::FieldDef<'hir> { - let ty = if let TyKind::Path(qself, path) = &f.ty.kind { - let t = self.lower_path_ty( - &f.ty, - qself, - path, - ParamMode::ExplicitNamed, // no `'_` in declarations (Issue #61124) - ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy), - ); - self.arena.alloc(t) - } else { - self.lower_ty(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy)) - }; + let ty = self.lower_ty(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy)); let hir_id = self.lower_node_id(f.id); self.lower_attrs(hir_id, &f.attrs); hir::FieldDef { diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 4b8c47ac4b4..b968860a85e 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -481,8 +481,6 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> { enum ParamMode { /// Any path in a type context. Explicit, - /// Path in a type definition, where the anonymous lifetime `'_` is not allowed. - ExplicitNamed, /// The `module::Type` in `module::Type::method` in an expression. Optional, } |
