Skip to content

Commit 5698f43

Browse files
committed
Auto merge of #10552 - Alexendoo:unnecessary-struct-initialization-nursery, r=flip1995
Move unnecessary_struct_initialization to nursery changelog: none, assuming it makes into the same release as #10489 Mostly because of #10547 but there is also #10548
2 parents 5ed64d4 + a6f56cb commit 5698f43

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clippy_lints/src/unnecessary_struct_initialization.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ declare_clippy_lint! {
99
/// any field.
1010
///
1111
/// ### Why is this bad?
12-
/// Readibility suffers from unnecessary struct building.
12+
/// Readability suffers from unnecessary struct building.
1313
///
1414
/// ### Example
1515
/// ```rust
@@ -25,9 +25,13 @@ declare_clippy_lint! {
2525
/// let a = S { s: String::from("Hello, world!") };
2626
/// let b = a;
2727
/// ```
28+
///
29+
/// ### Known Problems
30+
/// Has false positives when the base is a place expression that cannot be
31+
/// moved out of, see [#10547](https://github.com/rust-lang/rust-clippy/issues/10547).
2832
#[clippy::version = "1.70.0"]
2933
pub UNNECESSARY_STRUCT_INITIALIZATION,
30-
complexity,
34+
nursery,
3135
"struct built from a base that can be written mode concisely"
3236
}
3337
declare_lint_pass!(UnnecessaryStruct => [UNNECESSARY_STRUCT_INITIALIZATION]);

0 commit comments

Comments
 (0)