summary refs log tree commit diff
path: root/compiler/rustc_lint/src/unit_bindings.rs
AgeCommit message (Collapse)AuthorLines
2023-11-20Add allow-by-default lint for unit bindings许杰友 Jieyou Xu (Joe)-0/+72
This lint is not triggered if any of the following conditions are met: - The user explicitly annotates the binding with the `()` type. - The binding is from a macro expansion. - The user explicitly wrote `let () = init;` - The user explicitly wrote `let pat = ();`. This is allowed for local lifetimes.