You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gets expanded in the suggestion, this should not happen I believe.
Checking x v0.1.0 (/tmp/x)
warning: field is never read: `n`
--> src/main.rs:3:5
|
3 | n: i32,
| ^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: field assignment outside of initializer for an instance created with Default::default()
--> src/main.rs:10:5
|
10 | s.s = String::from("hello world");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(clippy::field_reassign_with_default)]` on by default
note: consider initializing the variable with `S { s: String::from("hello world"), v: <[_]>::into_vec(box [$($x),+]), ..Default::default() }` and removing relevant reassignments
--> src/main.rs:9:5
|
9 | let mut s = S::default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
warning: 2 warnings emitted
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
clippy 0.0.212 (0d8a27a6f 2020-12-28)
The text was updated successfully, but these errors were encountered:
Code like this (notice the
vec![]
macro)gets expanded in the suggestion, this should not happen I believe.
clippy 0.0.212 (0d8a27a6f 2020-12-28)
The text was updated successfully, but these errors were encountered: