1
Fork 0

turn hir::ItemKind::Fn into a named-field variant

This commit is contained in:
Ralf Jung 2025-01-04 11:30:31 +01:00
parent c528b8c678
commit be65012aa3
65 changed files with 158 additions and 111 deletions

View file

@ -520,7 +520,7 @@ impl Subdiagnostic for AddLifetimeParamsSuggestion<'_> {
let is_impl = matches!(&node, hir::Node::ImplItem(_));
let (generics, parent_generics) = match node {
hir::Node::Item(&hir::Item {
kind: hir::ItemKind::Fn(_, ref generics, ..),
kind: hir::ItemKind::Fn { ref generics, .. },
..
})
| hir::Node::TraitItem(&hir::TraitItem { ref generics, .. })