Skip to content

Commit 83c6c11

Browse files
committed
Fix get_enclosing_block
1 parent d5bac82 commit 83c6c11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clippy_lints/src/utils/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,9 @@ pub fn get_enclosing_block<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, node: NodeI
518518
Node::NodeItem(&Item {
519519
node: ItemFn(_, _, _, _, _, eid),
520520
..
521+
}) | Node::NodeImplItem(&ImplItem {
522+
node: ImplItemKind::Method(_, eid),
523+
..
521524
}) => match cx.tcx.hir.body(eid).value.node {
522525
ExprBlock(ref block) => Some(block),
523526
_ => None,

0 commit comments

Comments
 (0)