Skip to content

Commit 7bc2e1d

Browse files
committed
fix: replace wrong id
1 parent 8dac8a6 commit 7bc2e1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ pub fn get_parent_expr<'c>(cx: &'c LateContext<'_, '_>, e: &Expr) -> Option<&'c
576576
if hir_id == parent_id {
577577
return None;
578578
}
579-
map.find_by_hir_id(hir_id).and_then(|node| {
579+
map.find_by_hir_id(parent_id).and_then(|node| {
580580
if let Node::Expr(parent) = node {
581581
Some(parent)
582582
} else {

0 commit comments

Comments
 (0)