Skip to content

Commit dfbc74b

Browse files
committed
Rustfmt all the things
1 parent af80c53 commit dfbc74b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+241
-208
lines changed

clippy_lints/src/approx_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use crate::utils::span_lint;
22
use crate::utils::sym;
3+
use lazy_static::lazy_static;
34
use rustc::hir::*;
45
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
56
use rustc::{declare_lint_pass, declare_tool_lint};
67
use std::f64::consts as f64;
78
use syntax::ast::{FloatTy, LitKind};
89
use syntax::symbol;
910
use syntax::symbol::Symbol;
10-
use lazy_static::lazy_static;
1111

1212
declare_clippy_lint! {
1313
/// **What it does:** Checks for floating point literals that approximate

clippy_lints/src/assertions_on_constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use rustc::{declare_lint_pass, declare_tool_lint};
55
use syntax_pos::Span;
66

77
use crate::consts::{constant, Constant};
8-
use crate::utils::{in_macro_or_desugar, is_direct_expn_of, span_help_and_lint};
98
use crate::utils::sym;
9+
use crate::utils::{in_macro_or_desugar, is_direct_expn_of, span_help_and_lint};
1010

1111
declare_clippy_lint! {
1212
/// **What it does:** Checks for `assert!(true)` and `assert!(false)` calls.

clippy_lints/src/attrs.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! checks for attributes
22
33
use crate::reexport::*;
4+
use crate::utils::sym;
45
use crate::utils::{
5-
in_macro_or_desugar, is_present_in_source, last_line_of_span, paths, snippet_opt, span_lint, span_lint_and_sugg,
6-
span_lint_and_then, without_block_comments, match_def_path
6+
in_macro_or_desugar, is_present_in_source, last_line_of_span, match_def_path, paths, snippet_opt, span_lint,
7+
span_lint_and_sugg, span_lint_and_then, without_block_comments,
78
};
8-
use crate::utils::sym;
99
use if_chain::if_chain;
1010
use rustc::hir::*;
1111
use rustc::lint::{
@@ -245,7 +245,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
245245
for lint in lint_list {
246246
match item.node {
247247
ItemKind::Use(..) => {
248-
if is_word(lint, *sym::unused_imports) || is_word(lint, *sym::deprecated) {
248+
if is_word(lint, *sym::unused_imports)
249+
|| is_word(lint, *sym::deprecated)
250+
{
249251
return;
250252
}
251253
},

clippy_lints/src/booleans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
use crate::utils::sym;
12
use crate::utils::{
23
get_trait_def_id, implements_trait, in_macro, in_macro_or_desugar, match_type, paths, snippet_opt,
34
span_lint_and_then, SpanlessEq,
45
};
5-
use crate::utils::sym;
6+
use lazy_static::lazy_static;
67
use rustc::hir::intravisit::*;
78
use rustc::hir::*;
89
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
@@ -12,7 +13,6 @@ use rustc_errors::Applicability;
1213
use syntax::ast::LitKind;
1314
use syntax::source_map::{dummy_spanned, Span, DUMMY_SP};
1415
use syntax::symbol::Symbol;
15-
use lazy_static::lazy_static;
1616

1717
declare_clippy_lint! {
1818
/// **What it does:** Checks for boolean expressions that can be written more

clippy_lints/src/bytecount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
use crate::utils::sym;
12
use crate::utils::{
23
contains_name, get_pat_name, match_type, paths, single_segment_path, snippet_with_applicability,
34
span_lint_and_sugg, walk_ptrs_ty,
45
};
5-
use crate::utils::sym;
66
use if_chain::if_chain;
77
use rustc::hir::*;
88
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};

clippy_lints/src/dbg_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::utils::{snippet_opt, span_help_and_lint, span_lint_and_sugg};
21
use crate::utils::sym;
2+
use crate::utils::{snippet_opt, span_help_and_lint, span_lint_and_sugg};
33
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
44
use rustc::{declare_lint_pass, declare_tool_lint};
55
use rustc_errors::Applicability;

clippy_lints/src/default_trait_access.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc::ty;
55
use rustc::{declare_lint_pass, declare_tool_lint};
66
use rustc_errors::Applicability;
77

8-
use crate::utils::{any_parent_is_automatically_derived, paths, span_lint_and_sugg, match_def_path};
8+
use crate::utils::{any_parent_is_automatically_derived, match_def_path, paths, span_lint_and_sugg};
99

1010
declare_clippy_lint! {
1111
/// **What it does:** Checks for literal calls to `Default::default()`.

clippy_lints/src/drop_bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::utils::{paths, span_lint, match_def_path};
1+
use crate::utils::{match_def_path, paths, span_lint};
22
use if_chain::if_chain;
33
use rustc::hir::*;
44
use rustc::lint::{LateLintPass, LintArray, LintPass};

clippy_lints/src/drop_forget_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::utils::{is_copy, paths, span_note_and_lint, match_def_path};
1+
use crate::utils::{is_copy, match_def_path, paths, span_note_and_lint};
22
use if_chain::if_chain;
33
use rustc::hir::*;
44
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};

clippy_lints/src/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::utils::SpanlessEq;
21
use crate::utils::sym;
2+
use crate::utils::SpanlessEq;
33
use crate::utils::{get_item_name, higher, match_type, paths, snippet, span_lint_and_then, walk_ptrs_ty};
44
use if_chain::if_chain;
55
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};

0 commit comments

Comments
 (0)