about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/partial_pub_fields.rs12
-rw-r--r--src/docs/partial_pub_fields.txt12
2 files changed, 12 insertions, 12 deletions
diff --git a/clippy_lints/src/partial_pub_fields.rs b/clippy_lints/src/partial_pub_fields.rs
index 42f892e3652..f60d9d65b12 100644
--- a/clippy_lints/src/partial_pub_fields.rs
+++ b/clippy_lints/src/partial_pub_fields.rs
@@ -18,17 +18,17 @@ declare_clippy_lint! {
     /// ### Example
     /// ```rust
     /// pub struct Color {
-    ///     pub r,
-    ///     pub g,
-    ///     b,
+    ///     pub r: u8,
+    ///     pub g: u8,
+    ///     b: u8,
     /// }
     /// ```
     /// Use instead:
     /// ```rust
     /// pub struct Color {
-    ///     pub r,
-    ///     pub g,
-    ///     pub b,
+    ///     pub r: u8,
+    ///     pub g: u8,
+    ///     pub b: u8,
     /// }
     /// ```
     #[clippy::version = "1.66.0"]
diff --git a/src/docs/partial_pub_fields.txt b/src/docs/partial_pub_fields.txt
index a332ec8c28a..b529adf1547 100644
--- a/src/docs/partial_pub_fields.txt
+++ b/src/docs/partial_pub_fields.txt
@@ -12,16 +12,16 @@ interior invariants and expose intentionally limited API to the outside world.
 ### Example
 ```
 pub struct Color {
-    pub r,
-    pub g,
-    b,
+    pub r: u8,
+    pub g: u8,
+    b: u8,
 }
 ```
 Use instead:
 ```
 pub struct Color {
-    pub r,
-    pub g,
-    pub b,
+    pub r: u8,
+    pub g: u8,
+    pub b: u8,
 }
 ```
\ No newline at end of file