]> git.lizzy.rs Git - rust.git/commitdiff
Use real type in doc examples
authorNathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com>
Tue, 19 Oct 2021 01:32:00 +0000 (18:32 -0700)
committerNathaniel Hamovitz <18648574+nhamovitz@users.noreply.github.com>
Tue, 19 Oct 2021 01:32:00 +0000 (18:32 -0700)
clippy_lints/src/trailing_zero_sized_array_without_repr.rs

index 5fa13605ae35b25d6dcec92f27cccd997106a949..bfe0049dfaeb28daccad4d3a770ce4dc106d9068 100644 (file)
     /// ### Example
     /// ```rust
     /// struct RarelyUseful {
-    ///     some_field: usize,
-    ///     last: [SomeType; 0],
+    ///     some_field: u32,
+    ///     last: [u32; 0],
     /// }
     /// ```
     ///
-    /// Use instead:
+    /// Use instead:    
     /// ```rust
     /// #[repr(C)]
     /// struct MoreOftenUseful {
     ///     some_field: usize,
-    ///     last: [SomeType; 0],
+    ///     last: [u32; 0],
     /// }
     /// ```
     pub TRAILING_ZERO_SIZED_ARRAY_WITHOUT_REPR,