chore: add simple comment for get_enclosing_block

This commit is contained in:
chansuke 2022-12-22 23:30:51 +09:00
parent a85e480dd1
commit 6145194b68

View file

@ -1304,6 +1304,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>> {
let map = &cx.tcx.hir();
let enclosing_node = map