about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Macleod <alex@macleod.io>2023-03-26 14:16:38 +0000
committerAlex Macleod <alex@macleod.io>2023-03-26 14:21:58 +0000
commita6f56cbdbaa6c65019278676a136299838ced65f (patch)
treebec8c02aa656fc4c8405b33ced0d80d8c4012d1f
parent5ed64d4c612508ece912f170005abd7988865d10 (diff)
downloadrust-a6f56cbdbaa6c65019278676a136299838ced65f.tar.gz
rust-a6f56cbdbaa6c65019278676a136299838ced65f.zip
Move unnecessary_struct_initialization to nursery
-rw-r--r--clippy_lints/src/unnecessary_struct_initialization.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/clippy_lints/src/unnecessary_struct_initialization.rs b/clippy_lints/src/unnecessary_struct_initialization.rs
index af0b4b1592f..084b031982d 100644
--- a/clippy_lints/src/unnecessary_struct_initialization.rs
+++ b/clippy_lints/src/unnecessary_struct_initialization.rs
@@ -9,7 +9,7 @@ declare_clippy_lint! {
     /// any field.
     ///
     /// ### Why is this bad?
-    /// Readibility suffers from unnecessary struct building.
+    /// Readability suffers from unnecessary struct building.
     ///
     /// ### Example
     /// ```rust
@@ -25,9 +25,13 @@ declare_clippy_lint! {
     /// let a = S { s: String::from("Hello, world!") };
     /// let b = a;
     /// ```
+    ///
+    /// ### Known Problems
+    /// Has false positives when the base is a place expression that cannot be
+    /// moved out of, see [#10547](https://github.com/rust-lang/rust-clippy/issues/10547).
     #[clippy::version = "1.70.0"]
     pub UNNECESSARY_STRUCT_INITIALIZATION,
-    complexity,
+    nursery,
     "struct built from a base that can be written mode concisely"
 }
 declare_lint_pass!(UnnecessaryStruct => [UNNECESSARY_STRUCT_INITIALIZATION]);