mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Remove ParamMode::ExplicitNamed
This commit is contained in:
parent
22572d0994
commit
b4d3fa4829
@ -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 {
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user