Skip to content

Commit d256371

Browse files
committed
submodules: update clippy from 70b93aa to e170c84
Changes: ```` rustup rust-lang/rust#70536 Rustup to rust-lang/rust#70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes #70554
1 parent 859b59e commit d256371

File tree

106 files changed

+180
-640
lines changed

Some content is hidden

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

106 files changed

+180
-640
lines changed

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
2-
31
* text=auto eol=lf
4-
*.rs rust
2+
*.rs text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
53
*.fixed linguist-language=Rust

README.md

Lines changed: 3 additions & 9 deletions
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 362 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
8+
[There are 361 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

@@ -90,14 +90,6 @@ Note that this is still experimental and only supported on the nightly channel:
9090
cargo fix -Z unstable-options --clippy
9191
```
9292

93-
#### Running only a single lint
94-
95-
If you care only about the warnings of a single lint and want to ignore everything else, you
96-
can first deny all the clippy lints and then explicitly enable the lint(s) you care about:
97-
````
98-
cargo clippy -- -Aclippy::all -Wclippy::useless_format
99-
````
100-
10193
### Running Clippy from the command line without installing it
10294

10395
To have cargo compile your crate with Clippy without Clippy installation
@@ -183,6 +175,8 @@ If you do not want to include your lint levels in your code, you can globally en
183175
flags to Clippy during the run: `cargo clippy -- -A clippy::lint_name` will run Clippy with `lint_name` disabled and
184176
`cargo clippy -- -W clippy::lint_name` will run it with that enabled. This also works with lint groups. For example you
185177
can run Clippy with warnings for all lints enabled: `cargo clippy -- -W clippy::pedantic`
178+
If you care only about a single lint, you can allow all others and then explicitly reenable
179+
the lint(s) you are interested in: `cargo clippy -- -Aclippy::all -Wclippy::useless_format -Wclippy::...`
186180

187181
## Contributing
188182

clippy_dev/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
bytecount = "0.6"
99
clap = "2.33"
10-
itertools = "0.8"
10+
itertools = "0.9"
1111
regex = "1"
1212
lazy_static = "1.0"
1313
shell-escape = "0.1"

clippy_lints/src/as_conversions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use rustc::lint::in_external_macro;
21
use rustc_ast::ast::{Expr, ExprKind};
32
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
3+
use rustc_middle::lint::in_external_macro;
44
use rustc_session::{declare_lint_pass, declare_tool_lint};
55

66
use crate::utils::span_lint_and_help;

clippy_lints/src/assign_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use crate::utils::{
33
};
44
use crate::utils::{higher, sugg};
55
use if_chain::if_chain;
6-
use rustc::hir::map::Map;
76
use rustc_errors::Applicability;
87
use rustc_hir as hir;
98
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
109
use rustc_lint::{LateContext, LateLintPass};
10+
use rustc_middle::hir::map::Map;
1111
use rustc_session::{declare_lint_pass, declare_tool_lint};
1212

1313
declare_clippy_lint! {

clippy_lints/src/atomic_ordering.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::utils::{match_def_path, span_lint_and_help};
22
use if_chain::if_chain;
3-
use rustc::ty;
43
use rustc_hir::def_id::DefId;
54
use rustc_hir::{Expr, ExprKind};
65
use rustc_lint::{LateContext, LateLintPass};
6+
use rustc_middle::ty;
77
use rustc_session::{declare_lint_pass, declare_tool_lint};
88

99
declare_clippy_lint! {

clippy_lints/src/attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ use crate::utils::{
66
span_lint_and_then, without_block_comments,
77
};
88
use if_chain::if_chain;
9-
use rustc::lint::in_external_macro;
10-
use rustc::ty;
119
use rustc_ast::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
1210
use rustc_ast::util::lev_distance::find_best_match_for_name;
1311
use rustc_errors::Applicability;
1412
use rustc_hir::{
1513
Block, Expr, ExprKind, ImplItem, ImplItemKind, Item, ItemKind, StmtKind, TraitFn, TraitItem, TraitItemKind,
1614
};
1715
use rustc_lint::{CheckLintNameResult, EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
16+
use rustc_middle::lint::in_external_macro;
17+
use rustc_middle::ty;
1818
use rustc_session::{declare_lint_pass, declare_tool_lint};
1919
use rustc_span::source_map::Span;
2020
use rustc_span::symbol::Symbol;

clippy_lints/src/block_in_if_condition.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::utils::{differing_macro_contexts, higher, snippet_block_with_applicability, span_lint, span_lint_and_sugg};
2-
use rustc::hir::map::Map;
3-
use rustc::lint::in_external_macro;
42
use rustc_errors::Applicability;
53
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
64
use rustc_hir::{BlockCheckMode, Expr, ExprKind};
75
use rustc_lint::{LateContext, LateLintPass, LintContext};
6+
use rustc_middle::hir::map::Map;
7+
use rustc_middle::lint::in_external_macro;
88
use rustc_session::{declare_lint_pass, declare_tool_lint};
99

1010
declare_clippy_lint! {

clippy_lints/src/booleans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use crate::utils::{
33
span_lint_and_then, SpanlessEq,
44
};
55
use if_chain::if_chain;
6-
use rustc::hir::map::Map;
76
use rustc_ast::ast::LitKind;
87
use rustc_errors::Applicability;
98
use rustc_hir::intravisit::{walk_expr, FnKind, NestedVisitorMap, Visitor};
109
use rustc_hir::{BinOpKind, Body, Expr, ExprKind, FnDecl, HirId, UnOp};
1110
use rustc_lint::{LateContext, LateLintPass};
11+
use rustc_middle::hir::map::Map;
1212
use rustc_session::{declare_lint_pass, declare_tool_lint};
1313
use rustc_span::source_map::Span;
1414

clippy_lints/src/bytecount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ use crate::utils::{
33
span_lint_and_sugg, walk_ptrs_ty,
44
};
55
use if_chain::if_chain;
6-
use rustc::ty;
76
use rustc_ast::ast::{Name, UintTy};
87
use rustc_errors::Applicability;
98
use rustc_hir::{BinOpKind, BorrowKind, Expr, ExprKind, UnOp};
109
use rustc_lint::{LateContext, LateLintPass};
10+
use rustc_middle::ty;
1111
use rustc_session::{declare_lint_pass, declare_tool_lint};
1212

1313
declare_clippy_lint! {

0 commit comments

Comments
 (0)