Skip to content
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

Update Clippy #85954

Merged
merged 77 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
97705b7
Merge commit '9e3cd88718cd1912a515d26dbd9c4019fd5a9577' into clippyup
flip1995 May 20, 2021
7304829
Early return from LintPass registration when collecting metadata
flip1995 May 20, 2021
60826e7
Auto merge of #7253 - flip1995:shrink-monster, r=xFrednet
bors May 20, 2021
6e03a30
Remove fix for rustc bug from `needless_borrow`
Jarcho Apr 18, 2021
6d4dc35
Improve `needless_borrow` lint
Jarcho Apr 18, 2021
2eafec1
Allow wparam and lparam in similar_names
whatisaphone May 20, 2021
e3a1ae7
Adding the ability to invalidate caches to force metadata collection
xFrednet May 20, 2021
31b97ea
Updated years in copyrigths
YohDeadfall May 20, 2021
853f593
Auto merge of #7258 - YohDeadfall:update-copyrights, r=Manishearth
bors May 21, 2021
029c326
Auto merge of #7105 - Jarcho:needless_borrow_pat, r=camsteffen
bors May 21, 2021
f355aeb
Move `needless_borrow` to style
Jarcho May 19, 2021
f694f85
Auto merge of #7254 - Jarcho:needless_borrow_2, r=Manishearth
bors May 21, 2021
60dd2b6
Fix `redundant_closure` for `vec![]` macro in a closure with arguments
Jarcho May 21, 2021
ae0d4da
Fix invalid syntax in `from_iter_instead_of_collect` suggestion with …
yotamofek May 22, 2021
8787186
Auto merge of #7263 - Jarcho:redundant_closure_macro, r=llogiq
bors May 22, 2021
297e743
Auto merge of #7264 - yotamofek:from_iter_instead_collect_as_trait, r…
bors May 22, 2021
41bb092
Auto merge of #7255 - whatisaphone:feat/similar-names-wparam-lparam, …
bors May 24, 2021
2f78d57
Downgrade suspicious_op..._groupings to Nursery
May 24, 2021
c25f4b4
Auto merge of #7266 - mikerite:20210524_sus_nursery, r=giraffate
bors May 24, 2021
e027b6b
Minor SpanlessHash improvements
camsteffen May 4, 2021
27ac647
Use discriminant instead of stable_hash
camsteffen May 12, 2021
f21d909
Use FxHasher
camsteffen May 12, 2021
24743b3
Use UnhashMap
camsteffen May 12, 2021
0ebd501
Add a short-circuiting case
camsteffen May 17, 2021
91aa821
remove cfg(bootstrap)
pietroalbini May 6, 2021
9d61b4e
Fix SpanlessEq for GenericArg::Const
camsteffen May 24, 2021
7f34057
Hash Symbol directly
camsteffen May 24, 2021
a248648
Auto merge of #7267 - camsteffen:sphash-improvements, r=Manishearth
bors May 24, 2021
1ac7e19
Move `semicolon_if_nothing_returned` to `pedantic`
mbartlett21 May 24, 2021
cadad20
Add semicolons up to `needless_for_each.rs`
mbartlett21 May 25, 2021
527fb42
Add all the semicolons to `clippy_lints`
mbartlett21 May 25, 2021
6d73777
Fix `same_item_push.rs`
mbartlett21 May 25, 2021
9cad27f
Add semicolon in `needless_for_each.rs`
mbartlett21 May 25, 2021
0c017ea
Remove semicolons in `clippy_utils`
mbartlett21 May 25, 2021
bcebea6
Run `cargo fmt`
mbartlett21 May 25, 2021
cd4abf9
Auto merge of #7268 - mbartlett21:update_semi, r=Manishearth
bors May 25, 2021
6d50cff
Auto merge of #7256 - xFrednet:7172-trick-cargos-caching-for-collecti…
bors May 25, 2021
5cc6635
Add macro_use clippy_utils
camsteffen May 26, 2021
c21b965
Fix missing_docs_in_private_items FP
camsteffen May 26, 2021
2e2021b
Add avoid_breaking_exported_api config option
camsteffen May 6, 2021
d7f47f2
Use break api config for wrong_pub_self_convention
camsteffen May 26, 2021
ee79077
Use break api config for pass by value or ref
camsteffen May 6, 2021
3d77a2b
Use break api config for enum_variant_names
camsteffen May 6, 2021
1ce581d
Use break api config for unnecessary_wraps
camsteffen May 6, 2021
55ccc7a
Use break api config for upper_case_acronyms
camsteffen May 6, 2021
c51472b
Add clippy.toml to project and tests
camsteffen May 6, 2021
7dd356d
Eat dogfood
camsteffen May 7, 2021
f205dd1
Auto merge of #7280 - camsteffen:macro-use, r=Manishearth
bors May 26, 2021
3af9584
Add deprecated lint tests
camsteffen May 7, 2021
6eea598
Fix config file lookup
camsteffen May 7, 2021
f3e77a4
Fix allow on some statement lints
camsteffen May 27, 2021
9c4651f
Auto merge of #7187 - camsteffen:avoid-break-exported, r=flip1995,pha…
bors May 27, 2021
8066f83
Auto merge of #7282 - camsteffen:lint-stmt-expr, r=flip1995
bors May 27, 2021
2fa9362
Auto merge of #7281 - camsteffen:has-doc-fp, r=flip1995
bors May 27, 2021
8d42288
Document to only push the created tag and not everything
flip1995 May 27, 2021
5cb49bc
Auto merge of #7283 - flip1995:release-doc, r=giraffate
bors May 27, 2021
d39a11c
Remove clippy_utils::consts re-export
camsteffen May 27, 2021
16e347f
Auto merge of #7284 - camsteffen:consts-reexport, r=flip1995
bors May 27, 2021
6c54f61
Move mini-macro to auxilary
camsteffen May 27, 2021
543a8a6
Auto merge of #7285 - camsteffen:mini-macro-move, r=flip1995
bors May 27, 2021
4ba6afd
Fix ICE in `too_many_lines` due to wrong assumptions on braces.
Jarcho May 27, 2021
5cdba7d
Auto merge of #7287 - Jarcho:ice_7272, r=flip1995
bors May 28, 2021
898b6a0
Add lint `suspicious_splitn`
Jarcho May 30, 2021
5fa08ea
Evaluate constant expressions in `suspicious_splitn`
Jarcho May 30, 2021
d1308ae
Auto merge of #7292 - Jarcho:suspicious_splitn, r=flip1995
bors May 30, 2021
58491d3
Update message for 'not_unsafe_ptr_arg_deref' lint
stevenengler May 31, 2021
860cb8f
Auto merge of #7294 - stevenengler:unsafe-ptr-deref-msg, r=Manishearth
bors May 31, 2021
97311f0
Add lint `manual_str_repeat`
Jarcho May 22, 2021
cfddf09
Fix type checks for `manual_str_repeat`
Jarcho May 23, 2021
f49251a
Remove util/cov.sh script
flip1995 May 31, 2021
ca570f9
Auto merge of #7265 - Jarcho:manual_str_repeat, r=giraffate
bors Jun 1, 2021
cf5f894
Auto merge of #7297 - flip1995:rm-cov, r=giraffate
bors Jun 1, 2021
531bfc8
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jun 3, 2021
ab8bede
Bump nightly version -> 2021-06-03
flip1995 Jun 3, 2021
3ae8faf
Auto merge of #7313 - flip1995:rustup, r=flip1995
bors Jun 3, 2021
39a1fdd
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
flip1995 Jun 3, 2021
647f2b4
Update Cargo.lock
flip1995 Jun 3, 2021
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
6 changes: 1 addition & 5 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,10 @@ name = "clippy"
version = "0.1.54"
dependencies = [
"cargo_metadata 0.12.0",
"clippy-mini-macro-test",
"clippy_lints",
"compiletest_rs",
"derive-new",
"filetime",
"quote",
"regex",
"rustc-workspace-hack",
Expand All @@ -566,10 +566,6 @@ dependencies = [
"tester",
]

[[package]]
name = "clippy-mini-macro-test"
version = "0.2.0"

[[package]]
name = "clippy_dev"
version = "0.0.1"
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 @@ -2493,6 +2493,7 @@ Released 2018-09-13
[`manual_ok_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_or
[`manual_range_contains`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
[`manual_saturating_arithmetic`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_saturating_arithmetic
[`manual_str_repeat`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat
[`manual_strip`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip
[`manual_swap`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap
[`manual_unwrap_or`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or
Expand Down Expand Up @@ -2622,6 +2623,7 @@ Released 2018-09-13
[`redundant_pub_crate`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
[`redundant_slicing`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing
[`redundant_static_lifetimes`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
[`ref_binding_to_reference`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_binding_to_reference
[`ref_in_deref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_in_deref
[`ref_option_ref`]: https://rust-lang.github.io/rust-clippy/master/index.html#ref_option_ref
[`regex_macro`]: https://rust-lang.github.io/rust-clippy/master/index.html#regex_macro
Expand Down Expand Up @@ -2670,6 +2672,7 @@ Released 2018-09-13
[`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_splitn`]: https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_splitn
[`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
2 changes: 1 addition & 1 deletion src/tools/clippy/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2014-2020 The Rust Project Developers
Copyright 2014-2021 The Rust Project Developers

Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
Expand Down
3 changes: 2 additions & 1 deletion src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ tempfile = { version = "3.1.0", optional = true }
cargo_metadata = "0.12"
compiletest_rs = { version = "0.6.0", features = ["tmp"] }
tester = "0.9"
clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }
serde = { version = "1.0", features = ["derive"] }
derive-new = "0.5"
regex = "1.4"
quote = "1"
syn = { version = "1", features = ["full"] }
# This is used by the `collect-metadata` alias.
filetime = "0.2"

# A noop dependency that changes in the Rust repository, it's a bit of a hack.
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2014-2020 The Rust Project Developers
Copyright 2014-2021 The Rust Project Developers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2014-2020 The Rust Project Developers
Copyright (c) 2014-2021 The Rust Project Developers

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
3 changes: 2 additions & 1 deletion src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml
value` mapping eg.

```toml
avoid-breaking-exported-api = false
blacklisted-names = ["toto", "tata", "titi"]
cognitive-complexity-threshold = 30
```
Expand Down Expand Up @@ -236,7 +237,7 @@ If you want to contribute to Clippy, you can find more information in [CONTRIBUT

## License

Copyright 2014-2020 The Rust Project Developers
Copyright 2014-2021 The Rust Project Developers

Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)> or the MIT license
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ fn main() {
);
println!(
"cargo:rustc-env=RUSTC_RELEASE_CHANNEL={}",
rustc_tools_util::get_channel().unwrap_or_default()
rustc_tools_util::get_channel()
);
}
1 change: 1 addition & 0 deletions src/tools/clippy/clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
avoid-breaking-exported-api = false
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ use rustc_lint::{LateContext, LateLintPass};
use rustc_middle::ty;
use rustc_session::{declare_lint_pass, declare_tool_lint};

use crate::consts::{constant, Constant};

use clippy_utils::comparisons::{normalize_comparison, Rel};
use clippy_utils::consts::{constant, Constant};
use clippy_utils::diagnostics::span_lint_and_help;
use clippy_utils::source::snippet;
use clippy_utils::ty::is_isize_or_usize;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::consts::constant_simple;
use clippy_utils::consts::constant_simple;
use clippy_utils::diagnostics::span_lint;
use rustc_hir as hir;
use rustc_lint::{LateContext, LateLintPass};
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/clippy_lints/src/assertions_on_constants.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::consts::{constant, Constant};
use clippy_utils::consts::{constant, Constant};
use clippy_utils::diagnostics::span_lint_and_help;
use clippy_utils::source::snippet_opt;
use clippy_utils::{is_direct_expn_of, is_expn_of, match_panic_call};
Expand Down Expand Up @@ -63,7 +63,7 @@ impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
&format!("`assert!(false, {})` should probably be replaced", panic_message),
None,
&format!("use `panic!({})` or `unreachable!({})`", panic_message, panic_message),
)
);
};

if let Some(debug_assert_span) = is_expn_of(e.span, "debug_assert") {
Expand Down
6 changes: 3 additions & 3 deletions src/tools/clippy/clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
let attrs = cx.tcx.hir().attrs(item.hir_id());
if is_relevant_item(cx, item) {
check_attrs(cx, item.span, item.ident.name, attrs)
check_attrs(cx, item.span, item.ident.name, attrs);
}
match item.kind {
ItemKind::ExternCrate(..) | ItemKind::Use(..) => {
Expand Down Expand Up @@ -343,13 +343,13 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {

fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) {
if is_relevant_impl(cx, item) {
check_attrs(cx, item.span, item.ident.name, cx.tcx.hir().attrs(item.hir_id()))
check_attrs(cx, item.span, item.ident.name, cx.tcx.hir().attrs(item.hir_id()));
}
}

fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) {
if is_relevant_trait(cx, item) {
check_attrs(cx, item.span, item.ident.name, cx.tcx.hir().attrs(item.hir_id()))
check_attrs(cx, item.span, item.ident.name, cx.tcx.hir().attrs(item.hir_id()));
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/tools/clippy/clippy_lints/src/bit_mask.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::consts::{constant, Constant};
use clippy_utils::consts::{constant, Constant};
use clippy_utils::diagnostics::{span_lint, span_lint_and_then};
use clippy_utils::sugg::Sugg;
use if_chain::if_chain;
Expand Down Expand Up @@ -115,9 +115,9 @@ impl<'tcx> LateLintPass<'tcx> for BitMask {
if let ExprKind::Binary(cmp, left, right) = &e.kind {
if cmp.node.is_comparison() {
if let Some(cmp_opt) = fetch_int_literal(cx, right) {
check_compare(cx, left, cmp.node, cmp_opt, e.span)
check_compare(cx, left, cmp.node, cmp_opt, e.span);
} else if let Some(cmp_val) = fetch_int_literal(cx, left) {
check_compare(cx, right, invert_cmp(cmp.node), cmp_val, e.span)
check_compare(cx, right, invert_cmp(cmp.node), cmp_val, e.span);
}
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ fn check_compare(cx: &LateContext<'_>, bit_op: &Expr<'_>, cmp_op: BinOpKind, cmp
}
fetch_int_literal(cx, right)
.or_else(|| fetch_int_literal(cx, left))
.map_or((), |mask| check_bit_mask(cx, op.node, cmp_op, mask, cmp_value, span))
.map_or((), |mask| check_bit_mask(cx, op.node, cmp_op, mask, cmp_value, span));
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/tools/clippy/clippy_lints/src/booleans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<'tcx> LateLintPass<'tcx> for NonminimalBool {
_: Span,
_: HirId,
) {
NonminimalBoolVisitor { cx }.visit_body(body)
NonminimalBoolVisitor { cx }.visit_body(body);
}
}

Expand Down Expand Up @@ -184,7 +184,7 @@ impl<'a, 'tcx, 'v> SuggestContext<'a, 'tcx, 'v> {
Term(n) => {
let terminal = self.terminals[n as usize];
if let Some(str) = simplify_not(self.cx, terminal) {
self.output.push_str(&str)
self.output.push_str(&str);
} else {
self.output.push('!');
let snip = snippet_opt(self.cx, terminal.span)?;
Expand Down Expand Up @@ -452,7 +452,7 @@ impl<'a, 'tcx> Visitor<'tcx> for NonminimalBoolVisitor<'a, 'tcx> {
}
match &e.kind {
ExprKind::Binary(binop, _, _) if binop.node == BinOpKind::Or || binop.node == BinOpKind::And => {
self.bool_expr(e)
self.bool_expr(e);
},
ExprKind::Unary(UnOp::Not, inner) => {
if self.cx.typeck_results().node_types()[inner.hir_id].is_bool() {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/casts/cast_sign_loss.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::consts::{constant, Constant};
use clippy_utils::consts::{constant, Constant};
use clippy_utils::diagnostics::span_lint;
use clippy_utils::{method_chain_args, sext};
use if_chain::if_chain;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/collapsible_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ declare_lint_pass!(CollapsibleIf => [COLLAPSIBLE_IF, COLLAPSIBLE_ELSE_IF]);
impl EarlyLintPass for CollapsibleIf {
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &ast::Expr) {
if !expr.span.from_expansion() {
check_if(cx, expr)
check_if(cx, expr);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/comparison_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl<'tcx> LateLintPass<'tcx> for ComparisonChain {
"`if` chain can be rewritten with `match`",
None,
"consider rewriting the `if` chain to use `cmp` and `match`",
)
);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/clippy_lints/src/consts.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/copies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ fn emit_branches_sharing_code_lint(
}

suggestions.push(("end", span, suggestion.to_string()));
add_expr_note = !cx.typeck_results().expr_ty(if_expr).is_unit()
add_expr_note = !cx.typeck_results().expr_ty(if_expr).is_unit();
}

let add_optional_msgs = |diag: &mut DiagnosticBuilder<'_>| {
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/clippy_lints/src/default_numeric_fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> {
match stmt.kind {
StmtKind::Local(local) => {
if local.ty.is_some() {
self.ty_bounds.push(TyBound::Any)
self.ty_bounds.push(TyBound::Any);
} else {
self.ty_bounds.push(TyBound::Nothing)
self.ty_bounds.push(TyBound::Nothing);
}
},

Expand Down
19 changes: 19 additions & 0 deletions src/tools/clippy/clippy_lints/src/deprecated_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,22 @@ declare_deprecated_lint! {
pub FILTER_MAP,
"this lint has been replaced by `manual_filter_map`, a more specific lint"
}

declare_deprecated_lint! {
/// **What it does:** Nothing. This lint has been deprecated.
///
/// **Deprecation reason:** The `avoid_breaking_exported_api` config option was added, which
/// enables the `enum_variant_names` lint for public items.
/// ```
pub PUB_ENUM_VARIANT_NAMES,
"set the `avoid_breaking_exported_api` config option to `false` to enable the `enum_variant_names` lint for public items"
}

declare_deprecated_lint! {
/// **What it does:** Nothing. This lint has been deprecated.
///
/// **Deprecation reason:** The `avoid_breaking_exported_api` config option was added, which
/// enables the `wrong_self_conversion` lint for public items.
pub WRONG_PUB_SELF_CONVENTION,
"set the `avoid_breaking_exported_api` config option to `false` to enable the `wrong_self_convention` lint for public items"
}
8 changes: 4 additions & 4 deletions src/tools/clippy/clippy_lints/src/double_comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ impl<'tcx> DoubleComparisons {
#[rustfmt::skip]
match (op, lkind, rkind) {
(BinOpKind::Or, BinOpKind::Eq, BinOpKind::Lt) | (BinOpKind::Or, BinOpKind::Lt, BinOpKind::Eq) => {
lint_double_comparison!(<=)
lint_double_comparison!(<=);
},
(BinOpKind::Or, BinOpKind::Eq, BinOpKind::Gt) | (BinOpKind::Or, BinOpKind::Gt, BinOpKind::Eq) => {
lint_double_comparison!(>=)
lint_double_comparison!(>=);
},
(BinOpKind::Or, BinOpKind::Lt, BinOpKind::Gt) | (BinOpKind::Or, BinOpKind::Gt, BinOpKind::Lt) => {
lint_double_comparison!(!=)
lint_double_comparison!(!=);
},
(BinOpKind::And, BinOpKind::Le, BinOpKind::Ge) | (BinOpKind::And, BinOpKind::Ge, BinOpKind::Le) => {
lint_double_comparison!(==)
lint_double_comparison!(==);
},
_ => (),
};
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/duration_subsec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::source_map::Spanned;

use crate::consts::{constant, Constant};
use clippy_utils::consts::{constant, Constant};
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::paths;

Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ impl<'tcx> Visitor<'tcx> for InsertSearcher<'_, 'tcx> {
let mut is_map_used = self.is_map_used;
for arm in arms {
if let Some(Guard::If(guard) | Guard::IfLet(_, guard)) = arm.guard {
self.visit_non_tail_expr(guard)
self.visit_non_tail_expr(guard);
}
is_map_used |= self.visit_cond_arm(arm.body);
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/enum_clike.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! lint on C-like enums that are `repr(isize/usize)` and have values that
//! don't fit into an `i32`

use crate::consts::{miri_to_const, Constant};
use clippy_utils::consts::{miri_to_const, Constant};
use clippy_utils::diagnostics::span_lint;
use rustc_hir::{Item, ItemKind};
use rustc_lint::{LateContext, LateLintPass};
Expand Down
Loading