mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
fmt
This commit is contained in:
parent
4cfb0966a1
commit
cdfb72a5e1
@ -119,13 +119,9 @@ fn parent_node_is_if_expr<'a, 'b>(expr: &Expr, cx: &LateContext<'a, 'b>) -> bool
|
|||||||
let parent_node = cx.tcx.hir().get(parent_id);
|
let parent_node = cx.tcx.hir().get(parent_id);
|
||||||
|
|
||||||
match parent_node {
|
match parent_node {
|
||||||
rustc::hir::Node::Expr(e) => {
|
rustc::hir::Node::Expr(e) => higher::if_block(&e).is_some(),
|
||||||
higher::if_block(&e).is_some()
|
rustc::hir::Node::Arm(e) => higher::if_block(&e.body).is_some(),
|
||||||
},
|
_ => false,
|
||||||
rustc::hir::Node::Arm(e) => {
|
|
||||||
higher::if_block(&e.body).is_some()
|
|
||||||
},
|
|
||||||
_ => false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user