Skip to content

Commit 9e3e964

Browse files
authored
Rustup (#16217)
r? @ghost changelog: none
2 parents 961ea1c + 1ff4682 commit 9e3e964

22 files changed

+85
-44
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.93"
3+
version = "0.1.94"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_config"
3-
version = "0.1.93"
3+
version = "0.1.94"
44
edition = "2024"
55
publish = false
66

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_lints"
3-
version = "0.1.93"
3+
version = "0.1.94"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(array_windows)]
1+
#![cfg_attr(bootstrap, feature(array_windows))]
22
#![feature(box_patterns)]
33
#![feature(macro_metavar_expr_concat)]
44
#![feature(f128)]

clippy_lints/src/manual_non_exhaustive.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive {
9292
(matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id)))
9393
.then_some((v.def_id, v.span))
9494
});
95-
// FIXME: rewrite in terms of `#![feature(exact_length_collection)]`. See: #149266
96-
if let Ok((id, span)) = Itertools::exactly_one(iter)
95+
if let Ok((id, span)) = iter.exactly_one()
9796
&& !find_attr!(cx.tcx.hir_attrs(item.hir_id()), AttributeKind::NonExhaustive(..))
9897
{
9998
self.potential_enums.push((item.owner_id.def_id, id, item.span, span));
@@ -105,8 +104,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualNonExhaustive {
105104
.iter()
106105
.filter(|field| !cx.effective_visibilities.is_exported(field.def_id));
107106
if fields.len() > 1
108-
// FIXME: rewrite in terms of `#![feature(exact_length_collection)]`. See: #149266
109-
&& let Ok(field) = Itertools::exactly_one(private_fields)
107+
&& let Ok(field) = private_fields.exactly_one()
110108
&& let TyKind::Tup([]) = field.ty.kind
111109
{
112110
span_lint_and_then(

clippy_lints/src/suspicious_operation_groupings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ fn ident_difference_expr_with_base_location(
545545
| (Field(_, _), Field(_, _))
546546
| (AssignOp(_, _, _), AssignOp(_, _, _))
547547
| (Assign(_, _, _), Assign(_, _, _))
548-
| (TryBlock(_), TryBlock(_))
548+
| (TryBlock(_, _), TryBlock(_, _))
549549
| (Await(_, _), Await(_, _))
550550
| (Gen(_, _, _, _), Gen(_, _, _, _))
551551
| (Block(_, _), Block(_, _))

clippy_utils/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_utils"
3-
version = "0.1.93"
3+
version = "0.1.94"
44
edition = "2024"
55
description = "Helpful tools for writing lints, provided as they are used in Clippy"
66
repository = "https://github.com/rust-lang/rust-clippy"
@@ -16,6 +16,10 @@ itertools = "0.12"
1616
rustc_apfloat = "0.2.0"
1717
serde = { version = "1.0", features = ["derive"] }
1818

19+
[lints.rust.unexpected_cfgs]
20+
level = "warn"
21+
check-cfg = ['cfg(bootstrap)']
22+
1923
[package.metadata.rust-analyzer]
2024
# This crate uses #[feature(rustc_private)]
2125
rustc_private = true

clippy_utils/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This crate is only guaranteed to build with this `nightly` toolchain:
88

99
<!-- begin autogenerated nightly -->
1010
```
11-
nightly-2025-11-28
11+
nightly-2025-12-11
1212
```
1313
<!-- end autogenerated nightly -->
1414

clippy_utils/src/ast_utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
199199
) => eq_label(ll.as_ref(), rl.as_ref()) && eq_pat(lp, rp) && eq_expr(li, ri) && eq_block(lt, rt) && lk == rk,
200200
(Loop(lt, ll, _), Loop(rt, rl, _)) => eq_label(ll.as_ref(), rl.as_ref()) && eq_block(lt, rt),
201201
(Block(lb, ll), Block(rb, rl)) => eq_label(ll.as_ref(), rl.as_ref()) && eq_block(lb, rb),
202-
(TryBlock(l), TryBlock(r)) => eq_block(l, r),
202+
(TryBlock(lb, lt), TryBlock(rb, rt)) => eq_block(lb, rb) && both(lt.as_deref(), rt.as_deref(), eq_ty),
203203
(Yield(l), Yield(r)) => eq_expr_opt(l.expr().map(Box::as_ref), r.expr().map(Box::as_ref)) && l.same_kind(r),
204204
(Ret(l), Ret(r)) => eq_expr_opt(l.as_deref(), r.as_deref()),
205205
(Break(ll, le), Break(rl, re)) => {

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![feature(rustc_private)]
66
#![feature(assert_matches)]
77
#![feature(unwrap_infallible)]
8-
#![feature(array_windows)]
8+
#![cfg_attr(bootstrap, feature(array_windows))]
99
#![recursion_limit = "512"]
1010
#![allow(
1111
clippy::missing_errors_doc,

0 commit comments

Comments
 (0)