From 6145194b687b67e65049ac8d9ec730ebadfc34d7 Mon Sep 17 00:00:00 2001 From: chansuke Date: Thu, 22 Dec 2022 23:30:51 +0900 Subject: [PATCH] chore: add simple comment for `get_enclosing_block` --- clippy_utils/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 43e2d1ec8..c3eb4e229 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -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