We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bea4d1 commit 7cab813Copy full SHA for 7cab813
src/librustc/hir/map/blocks.rs
@@ -51,6 +51,12 @@ impl MaybeFnLike for ast::Item {
51
}
52
53
54
+impl MaybeFnLike for ast::ImplItem {
55
+ fn is_fn_like(&self) -> bool {
56
+ match self.node { ast::ImplItemKind::Method(..) => true, _ => false, }
57
+ }
58
+}
59
+
60
impl MaybeFnLike for ast::TraitItem {
61
fn is_fn_like(&self) -> bool {
62
match self.node {
@@ -141,7 +147,7 @@ impl<'a> FnLikeNode<'a> {
141
147
let fn_like = match node {
142
148
map::NodeItem(item) => item.is_fn_like(),
143
149
map::NodeTraitItem(tm) => tm.is_fn_like(),
144
- map::NodeImplItem(_) => true,
150
+ map::NodeImplItem(it) => it.is_fn_like(),
145
151
map::NodeExpr(e) => e.is_fn_like(),
146
152
_ => false
153
};
0 commit comments