mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
Auto merge of #10140 - chansuke:chore/add-comment-for-enclosing-block, r=Alexendoo
chore: add simple comment for `get_enclosing_block` I was reading the code of `clippy_utils/src/lib.rs` and thought that adding comment on `get_closing_block` would be helpful to first time visitor. --- changelog: none <!-- changelog_checked -->
This commit is contained in:
commit
d39dd869a5
1 changed files with 1 additions and 0 deletions
|
@ -1317,6 +1317,7 @@ pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: hir::HirId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Gets the enclosing block, if any.
|
||||||
pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> {
|
pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> {
|
||||||
let map = &cx.tcx.hir();
|
let map = &cx.tcx.hir();
|
||||||
let enclosing_node = map
|
let enclosing_node = map
|
||||||
|
|
Loading…
Reference in a new issue