Skip to content

Commit f0cdee4

Browse files
committed
Auto merge of #11903 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents d166fab + 9d36c18 commit f0cdee4

File tree

180 files changed

+257
-242
lines changed

Some content is hidden

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

180 files changed

+257
-242
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ toml = "0.7.3"
3737
walkdir = "2.3"
3838
# This is used by the `collect-metadata` alias.
3939
filetime = "0.2"
40-
itertools = "0.10.1"
40+
itertools = "0.11"
4141

4242
# UI test dependencies
4343
clippy_utils = { path = "clippy_utils" }

clippy_dev/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
aho-corasick = "0.7"
88
clap = "4.1.4"
99
indoc = "1.0"
10-
itertools = "0.10.1"
10+
itertools = "0.11"
1111
opener = "0.5"
1212
shell-escape = "0.1"
1313
walkdir = "2.3"

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cargo_metadata = "0.15.3"
1414
clippy_config = { path = "../clippy_config" }
1515
clippy_utils = { path = "../clippy_utils" }
1616
declare_clippy_lint = { path = "../declare_clippy_lint" }
17-
itertools = "0.10.1"
17+
itertools = "0.11"
1818
quine-mc_cluskey = "0.2"
1919
regex-syntax = "0.7"
2020
serde = { version = "1.0", features = ["derive"] }

clippy_lints/src/booleans.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ impl<'a, 'tcx> NonminimalBoolVisitor<'a, 'tcx> {
424424
improvements.push(suggestion);
425425
}
426426
}
427-
let nonminimal_bool_lint = |suggestions: Vec<_>| {
427+
let nonminimal_bool_lint = |mut suggestions: Vec<_>| {
428428
if self.cx.tcx.lint_level_at_node(NONMINIMAL_BOOL, e.hir_id).0 != Level::Allow {
429+
suggestions.sort();
429430
span_lint_hir_and_then(
430431
self.cx,
431432
NONMINIMAL_BOOL,

clippy_lints/src/dereference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ impl TyCoercionStability {
771771
DefinedTy::Mir(ty) => Self::for_mir_ty(
772772
cx.tcx,
773773
ty.param_env,
774-
cx.tcx.erase_late_bound_regions(ty.value),
774+
cx.tcx.instantiate_bound_regions_with_erased(ty.value),
775775
for_return,
776776
),
777777
}

clippy_lints/src/derive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fn check_hash_peq<'tcx>(
255255
"you are deriving `Hash` but have implemented `PartialEq` explicitly",
256256
|diag| {
257257
if let Some(local_def_id) = impl_id.as_local() {
258-
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
258+
let hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id);
259259
diag.span_note(cx.tcx.hir().span(hir_id), "`PartialEq` implemented here");
260260
}
261261
},
@@ -299,7 +299,7 @@ fn check_ord_partial_ord<'tcx>(
299299

300300
span_lint_and_then(cx, DERIVE_ORD_XOR_PARTIAL_ORD, span, mess, |diag| {
301301
if let Some(local_def_id) = impl_id.as_local() {
302-
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id);
302+
let hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id);
303303
diag.span_note(cx.tcx.hir().span(hir_id), "`PartialOrd` implemented here");
304304
}
305305
});
@@ -381,7 +381,7 @@ fn check_unsafe_derive_deserialize<'tcx>(
381381
&& match_def_path(cx, trait_def_id, &paths::SERDE_DESERIALIZE)
382382
&& let ty::Adt(def, _) = ty.kind()
383383
&& let Some(local_def_id) = def.did().as_local()
384-
&& let adt_hir_id = cx.tcx.hir().local_def_id_to_hir_id(local_def_id)
384+
&& let adt_hir_id = cx.tcx.local_def_id_to_hir_id(local_def_id)
385385
&& !is_lint_allowed(cx, UNSAFE_DERIVE_DESERIALIZE, adt_hir_id)
386386
&& cx
387387
.tcx

clippy_lints/src/equatable_if_let.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ fn unary_pattern(pat: &Pat<'_>) -> bool {
4646
pats.iter().all(unary_pattern)
4747
}
4848
match &pat.kind {
49-
PatKind::Slice(_, _, _) | PatKind::Range(_, _, _) | PatKind::Binding(..) | PatKind::Wild | PatKind::Or(_) => {
50-
false
51-
},
49+
PatKind::Slice(_, _, _)
50+
| PatKind::Range(_, _, _)
51+
| PatKind::Binding(..)
52+
| PatKind::Wild
53+
| PatKind::Never
54+
| PatKind::Or(_) => false,
5255
PatKind::Struct(_, a, etc) => !etc && a.iter().all(|x| unary_pattern(x.pat)),
5356
PatKind::Tuple(a, etc) | PatKind::TupleStruct(_, a, etc) => etc.as_opt_usize().is_none() && array_rec(a),
5457
PatKind::Ref(x, _) | PatKind::Box(x) => unary_pattern(x),

clippy_lints/src/error_impl_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'tcx> LateLintPass<'tcx> for ErrorImplError {
5858
if let Some(trait_def_id) = imp.of_trait.and_then(|t| t.trait_def_id())
5959
&& error_def_id == trait_def_id
6060
&& let Some(def_id) = path_res(cx, imp.self_ty).opt_def_id().and_then(DefId::as_local)
61-
&& let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def_id)
61+
&& let hir_id = cx.tcx.local_def_id_to_hir_id(def_id)
6262
&& let Some(ident) = cx.tcx.opt_item_ident(def_id.to_def_id())
6363
&& ident.name == sym::Error
6464
&& is_visible_outside_module(cx, def_id) =>

clippy_lints/src/escape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
7474
let parent_id = cx
7575
.tcx
7676
.hir()
77-
.get_parent_item(cx.tcx.hir().local_def_id_to_hir_id(fn_def_id))
77+
.get_parent_item(cx.tcx.local_def_id_to_hir_id(fn_def_id))
7878
.def_id;
7979
let parent_node = cx.tcx.hir().find_by_def_id(parent_id);
8080

clippy_lints/src/excessive_bools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<'tcx> LateLintPass<'tcx> for ExcessiveBools {
171171
span: Span,
172172
def_id: LocalDefId,
173173
) {
174-
let hir_id = cx.tcx.hir().local_def_id_to_hir_id(def_id);
174+
let hir_id = cx.tcx.local_def_id_to_hir_id(def_id);
175175
if let Some(fn_header) = fn_kind.header()
176176
&& fn_header.abi == Abi::Rust
177177
&& get_parent_as_impl(cx.tcx, hir_id).map_or(true, |impl_item| impl_item.of_trait.is_none())

0 commit comments

Comments
 (0)