From 44c46d2059a627a6c3c68038993da53472d5a03b Mon Sep 17 00:00:00 2001 From: flip1995 Date: Sun, 10 Mar 2019 22:12:26 +0100 Subject: [PATCH] Run rustfmt --- clippy_lints/src/assign_ops.rs | 5 ++--- clippy_lints/src/misc.rs | 2 +- clippy_lints/src/question_mark.rs | 4 ++-- tests/ui/crashes/ice-2760.rs | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/clippy_lints/src/assign_ops.rs b/clippy_lints/src/assign_ops.rs index 720a3e0c546..b71a5cf87c9 100644 --- a/clippy_lints/src/assign_ops.rs +++ b/clippy_lints/src/assign_ops.rs @@ -1,13 +1,12 @@ use if_chain::if_chain; -use rustc_errors::Applicability; use rustc::hir; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; 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, + get_trait_def_id, implements_trait, snippet_opt, span_lint_and_then, trait_ref_of_method, SpanlessEq, }; use crate::utils::{higher, sugg}; diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index 46cb9ecc49b..fabcf5d8e82 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -10,12 +10,12 @@ use syntax::ast::LitKind; use syntax::source_map::{ExpnFormat, Span}; use crate::consts::{constant, Constant}; +use crate::utils::sugg::Sugg; use crate::utils::{ get_item_name, get_parent_expr, implements_trait, in_constant, in_macro, is_integer_literal, iter_input_pats, last_path_segment, match_qpath, match_trait_method, paths, snippet, span_lint, span_lint_and_then, walk_ptrs_ty, SpanlessEq, }; -use crate::utils::sugg::Sugg; declare_clippy_lint! { /// **What it does:** Checks for function arguments and let bindings denoted as diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs index de11e3ff45b..7821ad56ccc 100644 --- a/clippy_lints/src/question_mark.rs +++ b/clippy_lints/src/question_mark.rs @@ -1,14 +1,14 @@ use if_chain::if_chain; -use rustc::{declare_tool_lint, lint_array}; use rustc::hir::def::Def; use rustc::hir::*; use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass}; +use rustc::{declare_tool_lint, lint_array}; use rustc_errors::Applicability; use syntax::ptr::P; -use crate::utils::{match_def_path, match_type, span_lint_and_then, SpanlessEq}; use crate::utils::paths::*; use crate::utils::sugg::Sugg; +use crate::utils::{match_def_path, match_type, span_lint_and_then, SpanlessEq}; declare_clippy_lint! { /// **What it does:** Checks for expressions that could be replaced by the question mark operator. diff --git a/tests/ui/crashes/ice-2760.rs b/tests/ui/crashes/ice-2760.rs index f146adbce41..f1a229f3f4f 100644 --- a/tests/ui/crashes/ice-2760.rs +++ b/tests/ui/crashes/ice-2760.rs @@ -8,7 +8,6 @@ /// This should not compile-fail with: /// /// error[E0277]: the trait bound `T: Foo` is not satisfied -/// // See rust-lang/rust-clippy#2760. trait Foo {