Skip to content

Commit a5c28f9

Browse files
committed
Update Clippy
1 parent b69895b commit a5c28f9

File tree

114 files changed

+795
-216
lines changed

Some content is hidden

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

114 files changed

+795
-216
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,22 @@ matrix:
8282
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
8383
- env: INTEGRATION=hyperium/hyper
8484
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
85-
- env: INTEGRATION=bluss/rust-itertools
85+
- env: INTEGRATION=rust-itertools/itertools
8686
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
8787
# FIXME: rustc ICE on `serde_test_suite`
8888
# - env: INTEGRATION=serde-rs/serde
8989
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
90-
- env: INTEGRATION=rust-lang-nursery/stdsimd
90+
- env: INTEGRATION=rust-lang/stdarch
9191
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
9292
- env: INTEGRATION=rust-random/rand
9393
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
94-
- env: INTEGRATION=rust-lang-nursery/futures-rs
94+
- env: INTEGRATION=rust-lang/futures-rs
9595
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
9696
- env: INTEGRATION=Marwes/combine
9797
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
9898
- env: INTEGRATION=rust-lang-nursery/failure
9999
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
100-
- env: INTEGRATION=rust-lang-nursery/log
100+
- env: INTEGRATION=rust-lang/log
101101
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
102102
- env: INTEGRATION=chronotope/chrono
103103
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,7 @@ Released 2018-09-13
11411141
[`iter_cloned_collect`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect
11421142
[`iter_next_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_loop
11431143
[`iter_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
1144+
[`iter_nth_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
11441145
[`iter_skip_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
11451146
[`iterator_step_by_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#iterator_step_by_zero
11461147
[`just_underscores_and_digits`]: https://rust-lang.github.io/rust-clippy/master/index.html#just_underscores_and_digits
@@ -1173,6 +1174,7 @@ Released 2018-09-13
11731174
[`mem_discriminant_non_enum`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_discriminant_non_enum
11741175
[`mem_forget`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_forget
11751176
[`mem_replace_option_with_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
1177+
[`mem_replace_with_default`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
11761178
[`mem_replace_with_uninit`]: https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_uninit
11771179
[`min_max`]: https://rust-lang.github.io/rust-clippy/master/index.html#min_max
11781180
[`misaligned_transmute`]: https://rust-lang.github.io/rust-clippy/master/index.html#misaligned_transmute

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
88

9-
[There are 342 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
9+
[There are 344 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
1010

1111
We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
1212

clippy_lints/src/approx_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use rustc::declare_lint_pass;
33
use rustc::hir::*;
44
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
55
use rustc_session::declare_tool_lint;
6+
use rustc_span::symbol;
67
use std::f64::consts as f64;
78
use syntax::ast::{FloatTy, LitFloatType, LitKind};
8-
use syntax::symbol;
99

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

clippy_lints/src/arithmetic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc::hir;
44
use rustc::impl_lint_pass;
55
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
66
use rustc_session::declare_tool_lint;
7-
use syntax::source_map::Span;
7+
use rustc_span::source_map::Span;
88

99
declare_clippy_lint! {
1010
/// **What it does:** Checks for plain integer arithmetic.

clippy_lints/src/assertions_on_constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn match_assert_with_message<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx E
130130
if let Some(begin_panic_call) = &inner_block.expr;
131131
// function call
132132
if let Some(args) = match_function_call(cx, begin_panic_call, &paths::BEGIN_PANIC);
133-
if args.len() == 2;
133+
if args.len() == 1;
134134
// bind the second argument of the `assert!` macro if it exists
135135
if let panic_message = snippet_opt(cx, args[0].span);
136136
// second argument of begin_panic is irrelevant

clippy_lints/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ use rustc::lint::{
1515
use rustc::ty;
1616
use rustc_errors::Applicability;
1717
use rustc_session::declare_tool_lint;
18+
use rustc_span::source_map::Span;
1819
use rustc_span::symbol::Symbol;
1920
use semver::Version;
2021
use syntax::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
21-
use syntax::source_map::Span;
2222
use syntax::util::lev_distance::find_best_match_for_name;
2323

2424
declare_clippy_lint! {

clippy_lints/src/bit_mask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use rustc::impl_lint_pass;
77
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
88
use rustc_errors::Applicability;
99
use rustc_session::declare_tool_lint;
10+
use rustc_span::source_map::Span;
1011
use syntax::ast::LitKind;
11-
use syntax::source_map::Span;
1212

1313
declare_clippy_lint! {
1414
/// **What it does:** Checks for incompatible bit masks in comparisons.

clippy_lints/src/booleans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use rustc::hir::*;
99
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
1010
use rustc_errors::Applicability;
1111
use rustc_session::declare_tool_lint;
12+
use rustc_span::source_map::Span;
1213
use syntax::ast::LitKind;
13-
use syntax::source_map::Span;
1414

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

clippy_lints/src/cargo_common_metadata.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use crate::utils::span_lint;
66
use rustc::declare_lint_pass;
77
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
88
use rustc_session::declare_tool_lint;
9-
use syntax::{ast::*, source_map::DUMMY_SP};
9+
use rustc_span::source_map::DUMMY_SP;
10+
use syntax::ast::*;
1011

1112
declare_clippy_lint! {
1213
/// **What it does:** Checks to see if all common metadata is defined in

0 commit comments

Comments
 (0)