Skip to content

Commit 5fc2ac4

Browse files
committed
Update cargo, clippy
1 parent cea76ad commit 5fc2ac4

File tree

110 files changed

+1211
-380
lines changed

Some content is hidden

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

110 files changed

+1211
-380
lines changed

.github/workflows/clippy_bors.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ jobs:
231231
matrix:
232232
integration:
233233
- 'rust-lang/cargo'
234-
- 'rust-lang/rls'
234+
# FIXME: Re-enable once we can test with rls again.
235+
# - 'rust-lang/rls'
235236
- 'rust-lang/chalk'
236237
- 'rust-lang/rustfmt'
237238
- 'Marwes/combine'

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
jobs:
1616
deploy:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'rust-lang/rust-clippy'
1819

1920
steps:
2021
# Setup

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ Released 2018-09-13
11691169
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
11701170
[`implicit_hasher`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_hasher
11711171
[`implicit_return`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
1172+
[`imprecise_flops`]: https://rust-lang.github.io/rust-clippy/master/index.html#imprecise_flops
11721173
[`inconsistent_digit_grouping`]: https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping
11731174
[`indexing_slicing`]: https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
11741175
[`ineffective_bit_mask`]: https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_bit_mask
@@ -1210,7 +1211,6 @@ Released 2018-09-13
12101211
[`lossy_float_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#lossy_float_literal
12111212
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
12121213
[`manual_memcpy`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
1213-
[`manual_mul_add`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_mul_add
12141214
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
12151215
[`manual_swap`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap
12161216
[`many_single_char_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names
@@ -1349,6 +1349,7 @@ Released 2018-09-13
13491349
[`string_lit_as_bytes`]: https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes
13501350
[`string_to_string`]: https://rust-lang.github.io/rust-clippy/master/index.html#string_to_string
13511351
[`struct_excessive_bools`]: https://rust-lang.github.io/rust-clippy/master/index.html#struct_excessive_bools
1352+
[`suboptimal_flops`]: https://rust-lang.github.io/rust-clippy/master/index.html#suboptimal_flops
13521353
[`suspicious_arithmetic_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl
13531354
[`suspicious_assignment_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_assignment_formatting
13541355
[`suspicious_else_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
3737
regex = "1"
3838
semver = "0.9"
3939
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
40-
git2 = { version = "0.11", optional = true }
40+
git2 = { version = "0.12", optional = true }
4141
tempfile = { version = "3.1.0", optional = true }
4242
lazy_static = "1.0"
4343

README.md

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

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

8-
[There are 357 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
8+
[There are 358 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
99

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

clippy_dev/src/new_lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn create(pass: Option<&str>, lint_name: Option<&str>, category: Option<&str
1313
match open_files(lint_name) {
1414
Ok((mut test_file, mut lint_file)) => {
1515
let (pass_type, pass_lifetimes, pass_import, context_import) = match pass {
16-
"early" => ("EarlyLintPass", "", "use syntax::ast::*;", "EarlyContext"),
16+
"early" => ("EarlyLintPass", "", "use rustc_ast::ast::*;", "EarlyContext"),
1717
"late" => ("LateLintPass", "<'_, '_>", "use rustc_hir::*;", "LateContext"),
1818
_ => {
1919
unreachable!("`pass_type` should only ever be `early` or `late`!");

clippy_lints/src/approx_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::utils::span_lint;
2+
use rustc_ast::ast::{FloatTy, LitFloatType, LitKind};
23
use rustc_hir::{Expr, ExprKind};
34
use rustc_lint::{LateContext, LateLintPass};
45
use rustc_session::{declare_lint_pass, declare_tool_lint};
56
use rustc_span::symbol;
67
use std::f64::consts as f64;
7-
use syntax::ast::{FloatTy, LitFloatType, LitKind};
88

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

clippy_lints/src/as_conversions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc::lint::in_external_macro;
2+
use rustc_ast::ast::{Expr, ExprKind};
23
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
34
use rustc_session::{declare_lint_pass, declare_tool_lint};
4-
use syntax::ast::{Expr, ExprKind};
55

66
use crate::utils::span_lint_and_help;
77

clippy_lints/src/assertions_on_constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use crate::consts::{constant, Constant};
22
use crate::utils::paths;
33
use crate::utils::{is_direct_expn_of, is_expn_of, match_function_call, snippet_opt, span_lint_and_help};
44
use if_chain::if_chain;
5+
use rustc_ast::ast::LitKind;
56
use rustc_hir::{Expr, ExprKind, PatKind, UnOp};
67
use rustc_lint::{LateContext, LateLintPass};
78
use rustc_session::{declare_lint_pass, declare_tool_lint};
8-
use syntax::ast::LitKind;
99

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

clippy_lints/src/attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ use crate::utils::{
88
use if_chain::if_chain;
99
use rustc::lint::in_external_macro;
1010
use rustc::ty;
11+
use rustc_ast::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
12+
use rustc_ast::util::lev_distance::find_best_match_for_name;
1113
use rustc_errors::Applicability;
1214
use rustc_hir::{
1315
Block, Expr, ExprKind, ImplItem, ImplItemKind, Item, ItemKind, StmtKind, TraitItem, TraitItemKind, TraitMethod,
@@ -17,8 +19,6 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
1719
use rustc_span::source_map::Span;
1820
use rustc_span::symbol::Symbol;
1921
use semver::Version;
20-
use syntax::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
21-
use syntax::util::lev_distance::find_best_match_for_name;
2222

2323
declare_clippy_lint! {
2424
/// **What it does:** Checks for items annotated with `#[inline(always)]`,

0 commit comments

Comments
 (0)