Skip to content

Commit d39dd86

Browse files
committed
Auto merge of rust-lang#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 -->
2 parents a385d34 + 6145194 commit d39dd86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_utils/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: hir::HirId)
13171317
}
13181318
}
13191319

1320+
/// Gets the enclosing block, if any.
13201321
pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> {
13211322
let map = &cx.tcx.hir();
13221323
let enclosing_node = map

0 commit comments

Comments
 (0)