Document is_unit_expr()

This commit is contained in:
Samuel Tardieu
2025-08-27 00:34:53 +02:00
parent 9bfa95b6b3
commit 27d005a171
+1
View File
@@ -309,6 +309,7 @@ pub fn is_lang_item_or_ctor(cx: &LateContext<'_>, did: DefId, item: LangItem) ->
cx.tcx.lang_items().get(item) == Some(did)
}
/// Checks if `expr` is an empty block or an empty tuple.
pub fn is_unit_expr(expr: &Expr<'_>) -> bool {
matches!(
expr.kind,