mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Document is_unit_expr()
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user