]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/assign_ops.rs
Run rustfmt
[rust.git] / clippy_lints / src / assign_ops.rs
index 9e0b87bc37775b538446d7d180fe840293195250..b71a5cf87c98ee57191e76deb36f89855cdb948c 100644 (file)
@@ -1,7 +1,3 @@
-use crate::utils::{
-    get_trait_def_id, implements_trait, snippet_opt, span_lint_and_then, trait_ref_of_method, SpanlessEq,
-};
-use crate::utils::{higher, sugg};
 use if_chain::if_chain;
 use rustc::hir;
 use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
@@ -9,6 +5,11 @@
 use rustc::{declare_tool_lint, lint_array};
 use rustc_errors::Applicability;
 
+use crate::utils::{
+    get_trait_def_id, implements_trait, snippet_opt, span_lint_and_then, trait_ref_of_method, SpanlessEq,
+};
+use crate::utils::{higher, sugg};
+
 declare_clippy_lint! {
     /// **What it does:** Checks for `a = a op b` or `a = b commutative_op a`
     /// patterns.
@@ -19,7 +20,7 @@
     /// implementations that differ from the regular `Op` impl.
     ///
     /// **Example:**
-    /// ```ignore
+    /// ```rust
     /// let mut a = 5;
     /// ...
     /// a = a + b;
     /// op= b`.
     ///
     /// **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.
+    /// been `a = a op a op b` or `a = a op b`/`a op= b`. Therefore, it suggests both.
     /// If `a op= a op b` is really the correct behaviour it should be
     /// written as `a = a op a op b` as it's less confusing.
     ///
     /// **Example:**
-    /// ```ignore
+    /// ```rust
     /// let mut a = 5;
     /// ...
     /// a += a + b;