turn hir::ItemKind::Fn into a named-field variant
This commit is contained in:
parent
c528b8c678
commit
be65012aa3
65 changed files with 158 additions and 111 deletions
|
@ -634,7 +634,7 @@ impl<'hir> Map<'hir> {
|
|||
for (hir_id, node) in self.parent_iter(hir_id) {
|
||||
if let Node::Item(Item {
|
||||
kind:
|
||||
ItemKind::Fn(..)
|
||||
ItemKind::Fn { .. }
|
||||
| ItemKind::Const(..)
|
||||
| ItemKind::Static(..)
|
||||
| ItemKind::Mod(..)
|
||||
|
@ -823,7 +823,7 @@ impl<'hir> Map<'hir> {
|
|||
|
||||
let span = match self.tcx.hir_node(hir_id) {
|
||||
// Function-like.
|
||||
Node::Item(Item { kind: ItemKind::Fn(sig, ..), span: outer_span, .. })
|
||||
Node::Item(Item { kind: ItemKind::Fn { sig, .. }, span: outer_span, .. })
|
||||
| Node::TraitItem(TraitItem {
|
||||
kind: TraitItemKind::Fn(sig, ..),
|
||||
span: outer_span,
|
||||
|
@ -1149,7 +1149,7 @@ fn hir_id_to_string(map: Map<'_>, id: HirId) -> String {
|
|||
ItemKind::Use(..) => "use",
|
||||
ItemKind::Static(..) => "static",
|
||||
ItemKind::Const(..) => "const",
|
||||
ItemKind::Fn(..) => "fn",
|
||||
ItemKind::Fn { .. } => "fn",
|
||||
ItemKind::Macro(..) => "macro",
|
||||
ItemKind::Mod(..) => "mod",
|
||||
ItemKind::ForeignMod { .. } => "foreign mod",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue