about summary refs log tree commit diff
diff options
context:
space:
mode:
authorchansuke <moonset20@gmail.com>2022-12-22 23:30:51 +0900
committerchansuke <moonset20@gmail.com>2023-01-02 00:18:03 +0900
commit6145194b687b67e65049ac8d9ec730ebadfc34d7 (patch)
tree7394db8e7bd9c6b390d5a42f03e7ab57da0743de
parenta85e480dd15bca2231550a936398f30f97eb5d53 (diff)
downloadrust-6145194b687b67e65049ac8d9ec730ebadfc34d7.tar.gz
rust-6145194b687b67e65049ac8d9ec730ebadfc34d7.zip
chore: add simple comment for `get_enclosing_block`
-rw-r--r--clippy_utils/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs
index 43e2d1ec826..c3eb4e229ca 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