We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fdd0e72 + c6a2221 commit d855395Copy full SHA for d855395
clippy_lints/src/self_assignment.rs
@@ -20,14 +20,22 @@ declare_clippy_lint! {
20
/// ### Example
21
/// ```rust
22
/// struct Event {
23
- /// id: usize,
24
/// x: i32,
25
- /// y: i32,
+ /// }
+ ///
26
+ /// fn copy_position(a: &mut Event, b: &Event) {
27
+ /// a.x = a.x;
28
29
+ /// ```
30
31
+ /// Should be:
32
+ /// ```rust
33
+ /// struct Event {
34
+ /// x: i32,
35
/// }
36
///
37
/// fn copy_position(a: &mut Event, b: &Event) {
38
/// a.x = b.x;
- /// a.y = a.y;
39
40
/// ```
41
#[clippy::version = "1.48.0"]
0 commit comments