diff options
| author | Markus Legner <markus@legner.ch> | 2020-11-21 12:38:21 +0100 |
|---|---|---|
| committer | Markus Legner <markus@legner.ch> | 2020-11-27 08:55:04 +0100 |
| commit | e42a18f02a45ffc12016a71bb4a210aa62af9a24 (patch) | |
| tree | a5e7d1f146c1fbbf1558f0899a7c7a74a66aaf33 | |
| parent | 82a7068007a1490b43a2eb4e70e0f70de384a9ae (diff) | |
| download | rust-e42a18f02a45ffc12016a71bb4a210aa62af9a24.tar.gz rust-e42a18f02a45ffc12016a71bb4a210aa62af9a24.zip | |
Run `cargo dev fmt`.
| -rw-r--r-- | clippy_lints/src/misc.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index f16feb9b1ba..b527b2cc1cb 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -18,7 +18,7 @@ use crate::utils::sugg::Sugg; use crate::utils::{ get_item_name, get_parent_expr, higher, implements_trait, in_constant, is_integer_const, iter_input_pats, last_path_segment, match_qpath, match_trait_method, paths, snippet, snippet_opt, span_lint, span_lint_and_sugg, - span_lint_and_then, span_lint_hir_and_then, SpanlessEq, unsext, + span_lint_and_then, span_lint_hir_and_then, unsext, SpanlessEq, }; declare_clippy_lint! { @@ -439,8 +439,12 @@ impl<'tcx> LateLintPass<'tcx> for MiscLints { if let ty::Int(ity) = cx.typeck_results().expr_ty(right).kind() { if is_integer_const(cx, right, unsext(cx.tcx, -1, *ity)) { - span_lint(cx, MODULO_ONE, expr.span, - "any number modulo -1 will panic/overflow or result in 0"); + span_lint( + cx, + MODULO_ONE, + expr.span, + "any number modulo -1 will panic/overflow or result in 0", + ); } }; } |
