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.
1 parent 1f65617 commit 6ad7a92Copy full SHA for 6ad7a92
clippy_lints/src/assign_ops.rs
@@ -51,8 +51,10 @@ declare_clippy_lint! {
51
/// **Why is this bad?** Most likely these are bugs where one meant to write `a
52
/// op= b`.
53
///
54
-/// **Known problems:** Someone might actually mean `a op= a op b`, but that
55
-/// should rather be written as `a = (2 * a) op b` where applicable.
+/// **Known problems:** Clippy cannot know for sure if `a op= a op b` should have
+/// been `a = a op a op b` or `a = a op b`/`a op= b`. Therefore it suggests both.
56
+/// If `a op= a op b` is really the correct behaviour then
57
+/// rewrite it as `a = (2 * a) op b` as it's less confusing.
58
59
/// **Example:**
60
/// ```rust
0 commit comments