Skip to content

Update Clippy #79765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 118 commits into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
faa3e23
Add exteranal macros for as_conversions
Nov 3, 2020
8f89108
Fix FP in indirect `needless_collect` when used multiple times
giraffate Nov 9, 2020
5a83968
Change `redundant_pattern_matching` to also lint `std::task::Poll`
CDirkx Nov 17, 2020
1464dce
Thread `Constness` through selection
jonas-schievink Nov 22, 2020
4b698f2
Drop support for cloudabi targets
tesuji Oct 27, 2020
a39a93f
Disable unnecessary_cast for cfg-dependant types
camsteffen Nov 23, 2020
d3d2018
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
flip1995 Nov 23, 2020
284c359
Fix ICE in utils::implements_trait
flip1995 Nov 23, 2020
723ac0f
Auto merge of #6317 - chansuke:add-external-macro, r=llogiq
bors Nov 23, 2020
58a2bc4
Auto merge of #6369 - camsteffen:cast-cfg, r=Manishearth
bors Nov 23, 2020
e5fddb6
Auto merge of #78439 - lzutao:rm-clouldabi, r=Mark-Simulacrum
bors Nov 23, 2020
d708b44
Qualify `panic!` as `core::panic!` in non-built-in `core` macros
camelid Oct 25, 2020
209ab18
Merge remote-tracking branch 'upstream/master' into rustup
ebroto Nov 23, 2020
d5b40bf
Auto merge of #78343 - camelid:macros-qualify-panic, r=m-ou-se
bors Nov 23, 2020
51b633b
Auto merge of #6371 - ebroto:rustup, r=ebroto
bors Nov 23, 2020
295fe28
Auto merge of #6313 - giraffate:fix_fp_needless_collect, r=ebroto
bors Nov 23, 2020
53ce1dd
Auto merge of #79228 - flip1995:clippyup, r=oli-obk
bors Nov 24, 2020
9f1505c
clippy: Let rustc handle describing lints
flip1995 Oct 7, 2020
03f0431
clippy: Remove now obsolete lintlist module
flip1995 Oct 7, 2020
c6a577e
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Nov 24, 2020
5b40ce3
Auto merge of #6374 - flip1995:rustup, r=flip1995
bors Nov 24, 2020
f897d27
Auto merge of #6339 - CDirkx:redundant-pattern-match-poll, r=ebroto
bors Nov 24, 2020
f682783
Move lev_distance to rustc_ast, make non-generic
sivadeilra Nov 12, 2020
dc075b4
Change `redundant_pattern_matching` to also lint `std::net::IpAddr`
CDirkx Nov 25, 2020
aaa4325
add support for minimum supported rust version.
suyashb95 Oct 21, 2020
b2e2c08
Improve extract_msrv_attr! situation
flip1995 Nov 25, 2020
93f922a
Add note where the first definition of msrv attr is
flip1995 Nov 25, 2020
d06076c
Add test for multiple defined msrv attrs
flip1995 Nov 25, 2020
32c51d2
Auto merge of #6201 - Suyash458:master, r=flip1995
bors Nov 25, 2020
2345ef5
added lints str_to_string and string_to_string
PunitLodha Nov 14, 2020
85a17b5
update README.md for specifying msrv
suyashb95 Nov 25, 2020
ae57785
Auto merge of #6333 - PunitLodha:master, r=flip1995
bors Nov 25, 2020
94a6832
update README.md
suyashb95 Nov 25, 2020
b2eb55b
Fix formatting in README.md
flip1995 Nov 25, 2020
71f7dd8
Auto merge of #6379 - Suyash458:master, r=flip1995
bors Nov 25, 2020
3b53de6
Fix rust-lang/rust#79255 - Incorrect try suggestion for unnecessary f…
nico-abram Nov 22, 2020
403816f
Auto merge of #6362 - nico-abram:unnecessary_cast_dot_float_literal, …
bors Nov 26, 2020
3bcc75d
Remove mention of possibility to specify the MSRV with a tilde/caret
flip1995 Nov 26, 2020
6eb2c27
Note that it is possible to omit the patch version
flip1995 Nov 26, 2020
f303168
Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,M…
bors Nov 26, 2020
cb6a654
Added known problem to comparison_chain docs
pro-grammer1 Nov 26, 2020
d95f11b
Remove ForeignMod struct.
cjgillot Nov 11, 2020
0924d62
Merge remote-tracking branch 'upstream/master' into sync-from-rust
giraffate Nov 27, 2020
e91d15f
cargo dev fmt
giraffate Nov 27, 2020
7a73990
Auto merge of #6389 - giraffate:sync-from-rust, r=llogiq
bors Nov 27, 2020
f9b8a59
Auto merge of #6386 - rust-lang:flip1995-patch-1, r=ebroto
bors Nov 27, 2020
82a7068
Trigger modulo_one lint also on -1.
mlegner Nov 21, 2020
e42a18f
Run `cargo dev fmt`.
mlegner Nov 21, 2020
b822632
Factor out `check_binary` from function `check_expr`.
mlegner Nov 23, 2020
5d585ec
Auto merge of #79318 - cjgillot:fitem, r=lcnr
bors Nov 27, 2020
18d37a5
Merge remote-tracking branch 'upstream/master' into rustup
ebroto Nov 27, 2020
84ba08f
Auto merge of #6392 - ebroto:rustup, r=ebroto
bors Nov 27, 2020
af1cc5c
add suspicious_operation_groupings lint
Ryan1729 Nov 7, 2020
2347eac
Update error to reflect that integer literals can have float suffixes
camelid Nov 22, 2020
a644930
Auto merge of #6360 - mlegner:mod_one, r=llogiq
bors Nov 28, 2020
7a73a25
Auto merge of #6086 - Ryan1729:add-suspicious_chained_operators-lint,…
bors Nov 28, 2020
c1b9915
Fix weird dogfood error
flip1995 Nov 28, 2020
0e5aee1
items_after_statements: don't lint when they a separated by trailing …
flip1995 Nov 28, 2020
f7b2098
Fix a false positive in `unnecessary_wraps`
hkmatsumoto Nov 28, 2020
2c26cb1
Move `contains_return` to utils/mod.rs
hkmatsumoto Nov 28, 2020
e266708
do not trigger MATCH_LIKE_MATCHES_MACRO lint with attrs
alex-700 Nov 4, 2020
22e7775
Change formulation of known problems section
flip1995 Nov 28, 2020
76f2c10
issue_6357 update unreachable macro usage
Nov 28, 2020
d75bc86
Auto merge of #6396 - flip1995:rustup, r=ebroto
bors Nov 28, 2020
e42ba48
Auto merge of #6390 - pro-grammer1:master, r=ebroto
bors Nov 28, 2020
84cdb0a
Fix formatting
flip1995 Nov 28, 2020
b627731
Auto merge of #6290 - alex-700:fix-match-like-matches, r=flip1995
bors Nov 28, 2020
6cbb093
Auto merge of #6397 - matsujika:fix-6384, r=flip1995
bors Nov 28, 2020
bc723c5
Auto merge of #6398 - rajcspsg:issue_6357, r=flip1995
bors Nov 28, 2020
68cf94f
Auto merge of #6377 - CDirkx:redundant-pattern-match-ipaddr, r=ebroto
bors Nov 28, 2020
cd087e5
add rustc-semver to dependencies
suyashb95 Nov 28, 2020
4e4b831
fix msrv in test
suyashb95 Nov 28, 2020
d55d791
Update tests to remove old numeric constants
Oct 24, 2020
a75ab30
fix dogfood tests
suyashb95 Nov 29, 2020
af095db
fix msrv check
suyashb95 Nov 29, 2020
61b2928
add more tests for msrv
suyashb95 Nov 29, 2020
2838b04
add internal-lints feature to enable clippys internal lints (off by d…
matthiaskrgr Nov 8, 2020
958e2e2
fix clippy-dev update_lints
matthiaskrgr Nov 13, 2020
b25a6df
ci: partly clean build artifacts to work around "Found multiple rlibs…
matthiaskrgr Nov 13, 2020
5df286b
Improve SpanlessEq for blocks
camsteffen Nov 27, 2020
6e1fbfd
Add LocalUseVisitor
camsteffen Nov 27, 2020
28dec3b
Add collapsible_match lint
camsteffen Nov 25, 2020
fff5fa6
Eat collapsible_match dogfood
camsteffen Nov 25, 2020
a5d6855
Use LocalUsedVisitor in more places
camsteffen Nov 29, 2020
252083f
address review comments and rebase
matthiaskrgr Nov 16, 2020
0e20788
Split tests
camsteffen Nov 30, 2020
3be53bc
Auto merge of #79329 - camelid:int-lit-suffix-error, r=davidtwco
bors Nov 30, 2020
e7258ac
bump rustc-semver version. use in built method to compare versions
suyashb95 Nov 30, 2020
292a54e
CONTRIBUTING: update bors queue url from buildbot2.rlo to bors.rlo
matthiaskrgr Dec 1, 2020
4785da6
Auto merge of #6404 - flip1995:rustup, r=flip1995
bors Dec 3, 2020
c3db082
Rollup merge of #6308 - matthiaskrgr:internal_lints, r=flip1995
flip1995 Dec 3, 2020
b3d6d6e
Rollup merge of #6395 - Suyash458:master, r=flip1995
flip1995 Dec 3, 2020
e2ecc4a
Rollup merge of #6402 - camsteffen:collapsible-match, r=llogiq
flip1995 Dec 3, 2020
c9da866
Rollup merge of #6407 - matthiaskrgr:bors_website, r=Manishearth
flip1995 Dec 3, 2020
249b6fe
Auto merge of #6415 - flip1995:rollup-fz7872l, r=flip1995
bors Dec 3, 2020
8135ab8
Moved map_err_ignore to restriction and updated help message
Dec 3, 2020
f633ef6
didn't update lint correctly
Dec 3, 2020
75482f9
Apply suggestions from code review
Dec 3, 2020
4bc33d3
Update the stderr message in ui tests
Dec 3, 2020
b611306
Add lint unsafe_sizeof_count_copies
nico-abram Nov 28, 2020
0f954ba
Make the unsafe_sizeof_count_copies lint find copy_{from,to} method c…
nico-abram Nov 29, 2020
1b80990
Make the unsafe_sizeof_count_copies lint work with more functions
nico-abram Nov 29, 2020
63a3c44
Remove unnecessary unsafe_size_count_copies tests
nico-abram Nov 29, 2020
af9685b
Rename unsafe_sizeof_count_copies to size_of_in_element_count
nico-abram Dec 3, 2020
c1a5329
Add more functions to size_of_in_element_count
nico-abram Dec 1, 2020
5f821fb
Added test to make sure ignoring the error with a named wildcard valu…
Dec 4, 2020
7f22b1c
Auto merge of #6394 - nico-abram:unsafe_sizeof_count_copies, r=ebroto
bors Dec 4, 2020
13c1a01
Auto merge of #6416 - deg4uss3r:map_err_restricted, r=ebroto
bors Dec 4, 2020
01f3211
Turn unnecessary_wraps applicability to MaybeIncorrect
flip1995 Dec 4, 2020
75140e8
Fix a style of texts in `size_of_in_element_count`
giraffate Dec 4, 2020
4340229
Auto merge of #6419 - giraffate:fix_a_style_of_texts_in_size_of_in_el…
bors Dec 4, 2020
6edd598
Added a lint-fraction-readability flag to the configuration
xFrednet Dec 4, 2020
18383c6
Updated code for CI
xFrednet Dec 4, 2020
8d678bc
Auto merge of #6418 - flip1995:apple_wraps_mhm, r=llogiq
bors Dec 5, 2020
898b7c5
Renamed the configuraiton to unreadable-literal-lint-fractions
xFrednet Dec 5, 2020
c1664c5
Auto merge of #6421 - xFrednet:4176-unreadable-literal-lint-fractal-o…
bors Dec 6, 2020
d3eb49b
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
flip1995 Dec 6, 2020
898ef0f
Update Cargo.lock
flip1995 Dec 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ dependencies = [
"quine-mc_cluskey",
"quote",
"regex-syntax",
"rustc-semver",
"semver 0.11.0",
"serde",
"smallvec 1.4.2",
Expand Down Expand Up @@ -3365,6 +3366,12 @@ dependencies = [
"num_cpus",
]

[[package]]
name = "rustc-semver"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be1bdc7edf596692617627bbfeaba522131b18e06ca4df2b6b689e3c5d5ce84"

[[package]]
name = "rustc-std-workspace-alloc"
version = "1.99.0"
Expand Down Expand Up @@ -5265,7 +5272,7 @@ dependencies = [
"chrono",
"lazy_static",
"matchers",
"parking_lot 0.9.0",
"parking_lot 0.11.0",
"regex",
"serde",
"serde_json",
Expand Down
12 changes: 6 additions & 6 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ jobs:
SYSROOT=$(rustc --print sysroot)
echo "$SYSROOT/bin" >> $GITHUB_PATH

- name: Build
run: cargo build --features deny-warnings
- name: Build with internal lints
run: cargo build --features deny-warnings,internal-lints

- name: Test
run: cargo test --features deny-warnings
- name: Test with internal lints
run: cargo test --features deny-warnings,internal-lints

- name: Test clippy_lints
run: cargo test --features deny-warnings
- name: Test clippy_lints with internal lints
run: cargo test --features deny-warnings,internal-lints
working-directory: clippy_lints

- name: Test rustc_tools_util
Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,7 @@ Released 2018-09-13
[`cmp_owned`]: https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
[`cognitive_complexity`]: https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity
[`collapsible_if`]: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
[`collapsible_match`]: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
[`comparison_chain`]: https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
[`comparison_to_empty`]: https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty
[`copy_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#copy_iterator
Expand Down Expand Up @@ -2056,6 +2057,7 @@ Released 2018-09-13
[`single_element_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_element_loop
[`single_match`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_match
[`single_match_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
[`size_of_in_element_count`]: https://rust-lang.github.io/rust-clippy/master/index.html#size_of_in_element_count
[`skip_while_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#skip_while_next
[`slow_vector_initialization`]: https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization
[`stable_sort_primitive`]: https://rust-lang.github.io/rust-clippy/master/index.html#stable_sort_primitive
Expand All @@ -2073,6 +2075,7 @@ Released 2018-09-13
[`suspicious_else_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting
[`suspicious_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_map
[`suspicious_op_assign_impl`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_op_assign_impl
[`suspicious_operation_groupings`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_operation_groupings
[`suspicious_unary_op_formatting`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_unary_op_formatting
[`tabs_in_doc_comments`]: https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments
[`temporary_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#temporary_assignment
Expand Down
9 changes: 7 additions & 2 deletions src/tools/clippy/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ All contributors are expected to follow the [Rust Code of Conduct].

- [Contributing to Clippy](#contributing-to-clippy)
- [Getting started](#getting-started)
- [High level approach](#high-level-approach)
- [Finding something to fix/improve](#finding-something-to-fiximprove)
- [Writing code](#writing-code)
- [Getting code-completion for rustc internals to work](#getting-code-completion-for-rustc-internals-to-work)
- [How Clippy works](#how-clippy-works)
- [Fixing build failures caused by Rust](#fixing-build-failures-caused-by-rust)
- [Patching git-subtree to work with big repos](#patching-git-subtree-to-work-with-big-repos)
- [Performing the sync](#performing-the-sync)
- [Syncing back changes in Clippy to [`rust-lang/rust`]](#syncing-back-changes-in-clippy-to-rust-langrust)
- [Defining remotes](#defining-remotes)
- [Issue and PR triage](#issue-and-pr-triage)
- [Bors and Homu](#bors-and-homu)
- [Contributions](#contributions)
Expand Down Expand Up @@ -320,8 +325,8 @@ commands [here][homu_instructions].
[l-crash]: https://github.com/rust-lang/rust-clippy/labels/L-crash
[l-bug]: https://github.com/rust-lang/rust-clippy/labels/L-bug
[homu]: https://github.com/rust-lang/homu
[homu_instructions]: https://buildbot2.rust-lang.org/homu/
[homu_queue]: https://buildbot2.rust-lang.org/homu/queue/clippy
[homu_instructions]: https://bors.rust-lang.org/
[homu_queue]: https://bors.rust-lang.org/queue/clippy

## Contributions

Expand Down
5 changes: 3 additions & 2 deletions src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ path = "src/driver.rs"
clippy_lints = { version = "0.0.212", path = "clippy_lints" }
# end automatic update
semver = "0.11"
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }
tempfile = { version = "3.1.0", optional = true }

[dev-dependencies]
Expand All @@ -49,8 +49,9 @@ derive-new = "0.5"
rustc-workspace-hack = "1.0.0"

[build-dependencies]
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util" }

[features]
deny-warnings = []
integration = ["tempfile"]
internal-lints = ["clippy_lints/internal-lints"]
29 changes: 28 additions & 1 deletion src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ cargo clippy -- -W clippy::lint_name
```

This also works with lint groups. For example you
can run Clippy with warnings for all lints enabled:
can run Clippy with warnings for all lints enabled:
```terminal
cargo clippy -- -W clippy::pedantic
```
Expand All @@ -194,6 +194,33 @@ cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
```
Note that if you've run clippy before, this may only take effect after you've modified a file or ran `cargo clean`.

### Specifying the minimum supported Rust version

Projects that intend to support old versions of Rust can disable lints pertaining to newer features by
specifying the minimum supported Rust version (MSRV) in the clippy configuration file.

```toml
msrv = "1.30.0"
```

The MSRV can also be specified as an inner attribute, like below.

```rust
#![feature(custom_inner_attributes)]
#![clippy::msrv = "1.30.0"]

fn main() {
...
}
```

You can also omit the patch version when specifying the MSRV, so `msrv = 1.30`
is equivalent to `msrv = 1.30.0`.

Note: `custom_inner_attributes` is an unstable feature so it has to be enabled explicitly.

Lints that recognize this configuration option can be found [here](https://rust-lang.github.io/rust-clippy/master/index.html#msrv)

## Contributing

If you want to contribute to Clippy, you can find more information in [CONTRIBUTING.md](https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md).
Expand Down
32 changes: 23 additions & 9 deletions src/tools/clippy/clippy_dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,30 @@ pub fn gen_deprecated<'a>(lints: impl Iterator<Item = &'a Lint>) -> Vec<String>
}

#[must_use]
pub fn gen_register_lint_list<'a>(lints: impl Iterator<Item = &'a Lint>) -> Vec<String> {
let pre = " store.register_lints(&[".to_string();
let post = " ]);".to_string();
let mut inner = lints
pub fn gen_register_lint_list<'a>(
internal_lints: impl Iterator<Item = &'a Lint>,
usable_lints: impl Iterator<Item = &'a Lint>,
) -> Vec<String> {
let header = " store.register_lints(&[".to_string();
let footer = " ]);".to_string();
let internal_lints = internal_lints
.sorted_by_key(|l| format!(" &{}::{},", l.module, l.name.to_uppercase()))
.map(|l| {
format!(
" #[cfg(feature = \"internal-lints\")]\n &{}::{},",
l.module,
l.name.to_uppercase()
)
});
let other_lints = usable_lints
.sorted_by_key(|l| format!(" &{}::{},", l.module, l.name.to_uppercase()))
.map(|l| format!(" &{}::{},", l.module, l.name.to_uppercase()))
.sorted()
.collect::<Vec<String>>();
inner.insert(0, pre);
inner.push(post);
inner
.sorted();
let mut lint_list = vec![header];
lint_list.extend(internal_lints);
lint_list.extend(other_lints);
lint_list.push(footer);
lint_list
}

/// Gathers all files in `src/clippy_lints` and gathers all lints inside
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_dev/src/update_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn run(update_mode: UpdateMode) {
"end register lints",
false,
update_mode == UpdateMode::Change,
|| gen_register_lint_list(usable_lints.iter().chain(internal_lints.iter())),
|| gen_register_lint_list(internal_lints.iter(), usable_lints.iter()),
)
.changed;

Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ smallvec = { version = "1", features = ["union"] }
toml = "0.5.3"
unicode-normalization = "0.1"
semver = "0.11"
rustc-semver="1.1.0"
# NOTE: cargo requires serde feat in its url dep
# see <https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864>
url = { version = "2.1.0", features = ["serde"] }
Expand All @@ -36,3 +37,5 @@ syn = { version = "1", features = ["full"] }

[features]
deny-warnings = []
# build clippy with internal lints enabled, off by default
internal-lints = []
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::utils::{
span_lint_and_sugg, span_lint_and_then, without_block_comments,
};
use if_chain::if_chain;
use rustc_span::lev_distance::find_best_match_for_name;
use rustc_ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
use rustc_errors::Applicability;
use rustc_hir::{
Expand All @@ -15,6 +14,7 @@ use rustc_lint::{CheckLintNameResult, EarlyContext, EarlyLintPass, LateContext,
use rustc_middle::lint::in_external_macro;
use rustc_middle::ty;
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::lev_distance::find_best_match_for_name;
use rustc_span::source_map::Span;
use rustc_span::sym;
use rustc_span::symbol::{Symbol, SymbolStr};
Expand Down
Loading