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! {
28
28
///
29
29
/// ```rust
30
30
/// struct Vec3 {
31
- /// x: f64,
32
- /// y: f64,
33
- /// z: f64,
34
- ///}
31
+ /// x: f64,
32
+ /// y: f64,
33
+ /// z: f64,
34
+ /// }
35
35
///
36
- ///impl Eq for Vec3 {}
36
+ /// impl Eq for Vec3 {}
37
37
///
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
+ /// }
44
44
/// ```
45
45
/// Use instead:
46
46
/// ```rust
47
+ /// #struct Vec3 {
48
+ /// # x: f64,
49
+ /// # y: f64,
50
+ /// # z: f64,
51
+ /// #}
47
52
/// // same as above except:
48
53
/// impl PartialEq for Vec3 {
49
54
/// fn eq(&self, other: &Self) -> bool {
You can’t perform that action at this time.
0 commit comments