mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-12 16:45:37 +00:00
70 lines
1.3 KiB
Plaintext
70 lines
1.3 KiB
Plaintext
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:6:5
|
|
|
|
|
LL | let a;
|
|
| ^^^^^^
|
|
|
|
|
= note: `-D clippy::needless-late-init` implied by `-D warnings`
|
|
help: declare `a` here
|
|
|
|
|
LL | let a = "zero";
|
|
| ~~~~~
|
|
|
|
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:9:5
|
|
|
|
|
LL | let b;
|
|
| ^^^^^^
|
|
|
|
|
help: declare `b` here
|
|
|
|
|
LL | let b = 1;
|
|
| ~~~~~
|
|
|
|
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:10:5
|
|
|
|
|
LL | let c;
|
|
| ^^^^^^
|
|
|
|
|
help: declare `c` here
|
|
|
|
|
LL | let c = 2;
|
|
| ~~~~~
|
|
|
|
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:14:5
|
|
|
|
|
LL | let d: usize;
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
help: declare `d` here
|
|
|
|
|
LL | let d: usize = 1;
|
|
| ~~~~~~~~~~~~
|
|
|
|
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:17:5
|
|
|
|
|
LL | let mut e;
|
|
| ^^^^^^^^^^
|
|
|
|
|
help: declare `e` here
|
|
|
|
|
LL | let mut e = 1;
|
|
| ~~~~~~~~~
|
|
|
|
error: unneeded late initalization
|
|
--> $DIR/needless_late_init_fixable.rs:21:5
|
|
|
|
|
LL | let h;
|
|
| ^^^^^^
|
|
|
|
|
help: declare `h` here
|
|
|
|
|
LL | let h = format!("{}", e);
|
|
| ~~~~~
|
|
|
|
error: aborting due to 6 previous errors
|
|
|