mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 14:36:49 +00:00
![]() Add `needless_late_init` lint examples: ```rust let a; a = 1; // to let a = 1; ``` ```rust let b; match 3 { 0 => b = "zero", 1 => b = "one", _ => b = "many", } // to let b = match 3 { 0 => "zero", 1 => "one", _ => "many", }; ``` ```rust let c; if true { c = 1; } else { c = -1; } // to let c = if true { 1 } else { -1 }; ``` changelog: Add [`needless_late_init`] |
||
---|---|---|
.. | ||
cargo | ||
ui | ||
ui_test | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
fmt.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs |