diff options
| author | chansuke <moonset20@gmail.com> | 2022-12-22 23:30:51 +0900 |
|---|---|---|
| committer | chansuke <moonset20@gmail.com> | 2023-01-02 00:18:03 +0900 |
| commit | 6145194b687b67e65049ac8d9ec730ebadfc34d7 (patch) | |
| tree | 7394db8e7bd9c6b390d5a42f03e7ab57da0743de | |
| parent | a85e480dd15bca2231550a936398f30f97eb5d53 (diff) | |
| download | rust-6145194b687b67e65049ac8d9ec730ebadfc34d7.tar.gz rust-6145194b687b67e65049ac8d9ec730ebadfc34d7.zip | |
chore: add simple comment for `get_enclosing_block`
| -rw-r--r-- | clippy_utils/src/lib.rs | 1 |
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 |
