about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/unit_bindings.rs
AgeCommit message (Collapse)AuthorLines
2025-02-08Rustfmtbjorn3-3/+5
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-5/+3
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-02Inline & delete `Ty::new_unit`, since it's just a field accessWaffle Lapkin-3/+2
2024-04-29Remove `extern crate rustc_session` from `rustc_lint`.Nicholas Nethercote-0/+1
2024-03-22Rename `hir::Local` into `hir::LetStmt`Guillaume Gomez-1/+1
2024-01-23Rename `LintContext::emit_spanned_lint` as `LintContext::emit_span_lint`.Nicholas Nethercote-1/+1
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.