File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,27 @@ declare_clippy_lint! {
2828 ///
2929 /// ```rust
3030 /// struct Vec3 {
31- /// x: f64,
32- /// y: f64,
33- /// z: f64,
34- ///}
31+ /// x: f64,
32+ /// y: f64,
33+ /// z: f64,
34+ /// }
3535 ///
36- ///impl Eq for Vec3 {}
36+ /// impl Eq for Vec3 {}
3737 ///
38- ///impl PartialEq for Vec3 {
39- /// fn eq(&self, other: &Self) -> bool {
40- /// // This should trigger the lint because `self.x` is compared to `other.y`
41- /// self.x == other.y && self.y == other.y && self.z == other.z
42- /// }
43- ///}
38+ /// impl PartialEq for Vec3 {
39+ /// fn eq(&self, other: &Self) -> bool {
40+ /// // This should trigger the lint because `self.x` is compared to `other.y`
41+ /// self.x == other.y && self.y == other.y && self.z == other.z
42+ /// }
43+ /// }
4444 /// ```
4545 /// Use instead:
4646 /// ```rust
47+ /// #struct Vec3 {
48+ /// # x: f64,
49+ /// # y: f64,
50+ /// # z: f64,
51+ /// #}
4752 /// // same as above except:
4853 /// impl PartialEq for Vec3 {
4954 /// fn eq(&self, other: &Self) -> bool {
You can’t perform that action at this time.
0 commit comments