Skip to content

Commit 2dc84cb

Browse files
authored
Rustup (#15823)
r? @ghost Late sync. Was at Oktoberfest on Thursday and then forgot to do it over the long weekend in Germany. changelog: none
2 parents 23b1ace + 085ddaa commit 2dc84cb

14 files changed

+61
-45
lines changed

clippy_lints/src/casts/cast_ptr_alignment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ fn lint_cast_ptr_alignment<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_f
4343
expr.span,
4444
format!(
4545
"casting from `{cast_from}` to a more-strictly-aligned pointer (`{cast_to}`) ({} < {} bytes)",
46-
from_layout.align.abi.bytes(),
47-
to_layout.align.abi.bytes(),
46+
from_layout.align.bytes(),
47+
to_layout.align.bytes(),
4848
),
4949
);
5050
}

clippy_lints/src/casts/manual_dangling_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn is_literal_aligned(cx: &LateContext<'_>, lit: &Spanned<LitKind>, to: &Ty<'_>)
7272
cx.tcx
7373
.layout_of(cx.typing_env().as_query_input(to_mid_ty))
7474
.is_ok_and(|layout| {
75-
let align = u128::from(layout.align.abi.bytes());
75+
let align = u128::from(layout.align.bytes());
7676
u128::from(val) <= align
7777
})
7878
}

clippy_lints/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![feature(iter_intersperse)]
88
#![feature(iter_partition_in_place)]
99
#![feature(never_type)]
10-
#![cfg_attr(bootstrap, feature(round_char_boundary))]
1110
#![feature(rustc_private)]
1211
#![feature(stmt_expr_attributes)]
1312
#![feature(unwrap_infallible)]

clippy_lints/src/macro_metavars_in_unsafe.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ use clippy_config::Conf;
22
use clippy_utils::diagnostics::span_lint_hir_and_then;
33
use clippy_utils::is_lint_allowed;
44
use itertools::Itertools;
5+
use rustc_hir::attrs::AttributeKind;
56
use rustc_hir::def_id::LocalDefId;
67
use rustc_hir::intravisit::{Visitor, walk_block, walk_expr, walk_stmt};
7-
use rustc_hir::{BlockCheckMode, Expr, ExprKind, HirId, Stmt, UnsafeSource};
8+
use rustc_hir::{BlockCheckMode, Expr, ExprKind, HirId, Stmt, UnsafeSource, find_attr};
89
use rustc_lint::{LateContext, LateLintPass, Level, LintContext};
910
use rustc_middle::lint::LevelAndSource;
1011
use rustc_session::impl_lint_pass;
11-
use rustc_span::{Span, SyntaxContext, sym};
12+
use rustc_span::{Span, SyntaxContext};
1213
use std::collections::BTreeMap;
1314
use std::collections::btree_map::Entry;
1415

@@ -146,7 +147,8 @@ struct BodyVisitor<'a, 'tcx> {
146147
}
147148

148149
fn is_public_macro(cx: &LateContext<'_>, def_id: LocalDefId) -> bool {
149-
(cx.effective_visibilities.is_exported(def_id) || cx.tcx.has_attr(def_id, sym::macro_export))
150+
(cx.effective_visibilities.is_exported(def_id)
151+
|| find_attr!(cx.tcx.get_all_attrs(def_id), AttributeKind::MacroExport { .. }))
150152
&& !cx.tcx.is_doc_hidden(def_id)
151153
}
152154

clippy_lints/src/pass_by_ref_or_value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use rustc_hir::{BindingMode, Body, FnDecl, Impl, ItemKind, MutTy, Mutability, No
1414
use rustc_lint::{LateContext, LateLintPass};
1515
use rustc_middle::ty::adjustment::{Adjust, PointerCoercion};
1616
use rustc_middle::ty::layout::LayoutOf;
17-
use rustc_middle::ty::{self, RegionKind, TyCtxt};
17+
use rustc_middle::ty::{self, BoundVarIndexKind, RegionKind, TyCtxt};
1818
use rustc_session::impl_lint_pass;
1919
use rustc_span::def_id::LocalDefId;
2020
use rustc_span::{Span, sym};
@@ -151,7 +151,7 @@ impl PassByRefOrValue {
151151
match *ty.skip_binder().kind() {
152152
ty::Ref(lt, ty, Mutability::Not) => {
153153
match lt.kind() {
154-
RegionKind::ReBound(index, region)
154+
RegionKind::ReBound(BoundVarIndexKind::Bound(index), region)
155155
if index.as_u32() == 0 && output_regions.contains(&region) =>
156156
{
157157
continue;

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-09-18
11+
nightly-2025-10-06
1212
```
1313
<!-- end autogenerated nightly -->
1414

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn check_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, span: Span, msrv: Msrv)
8686
ty::FnPtr(..) => {
8787
return Err((span, "function pointers in const fn are unstable".into()));
8888
},
89-
ty::Dynamic(preds, _, _) => {
89+
ty::Dynamic(preds, _) => {
9090
for pred in *preds {
9191
match pred.skip_binder() {
9292
ty::ExistentialPredicate::AutoTrait(_) | ty::ExistentialPredicate::Projection(_) => {
@@ -141,7 +141,8 @@ fn check_rvalue<'tcx>(
141141
| CastKind::FloatToFloat
142142
| CastKind::FnPtrToPtr
143143
| CastKind::PtrToPtr
144-
| CastKind::PointerCoercion(PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer, _),
144+
| CastKind::PointerCoercion(PointerCoercion::MutToConstPointer | PointerCoercion::ArrayToPointer, _)
145+
| CastKind::Subtype,
145146
operand,
146147
_,
147148
) => check_operand(cx, operand, span, body, msrv),
@@ -312,7 +313,6 @@ fn check_place<'tcx>(
312313
| ProjectionElem::OpaqueCast(..)
313314
| ProjectionElem::Downcast(..)
314315
| ProjectionElem::Subslice { .. }
315-
| ProjectionElem::Subtype(_)
316316
| ProjectionElem::Index(_)
317317
| ProjectionElem::UnwrapUnsafeBinder(_) => {},
318318
}

clippy_utils/src/ty/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ use rustc_middle::traits::EvaluationResult;
2121
use rustc_middle::ty::adjustment::{Adjust, Adjustment};
2222
use rustc_middle::ty::layout::ValidityRequirement;
2323
use rustc_middle::ty::{
24-
self, AdtDef, AliasTy, AssocItem, AssocTag, Binder, BoundRegion, FnSig, GenericArg, GenericArgKind, GenericArgsRef,
25-
GenericParamDefKind, IntTy, Region, RegionKind, TraitRef, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable,
26-
TypeVisitableExt, TypeVisitor, UintTy, Upcast, VariantDef, VariantDiscr,
24+
self, AdtDef, AliasTy, AssocItem, AssocTag, Binder, BoundRegion, BoundVarIndexKind, FnSig, GenericArg,
25+
GenericArgKind, GenericArgsRef, GenericParamDefKind, IntTy, Region, RegionKind, TraitRef, Ty, TyCtxt,
26+
TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor, UintTy, Upcast, VariantDef, VariantDiscr,
2727
};
2828
use rustc_span::symbol::Ident;
2929
use rustc_span::{DUMMY_SP, Span, Symbol, sym};
@@ -344,7 +344,7 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
344344
}
345345
false
346346
},
347-
ty::Dynamic(binder, _, _) => {
347+
ty::Dynamic(binder, _) => {
348348
for predicate in *binder {
349349
if let ty::ExistentialPredicate::Trait(ref trait_ref) = predicate.skip_binder()
350350
&& find_attr!(cx.tcx.get_all_attrs(trait_ref.def_id), AttributeKind::MustUse { .. })
@@ -655,7 +655,7 @@ pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option<ExprFnSig<'t
655655
cx.tcx.opt_parent(def_id),
656656
),
657657
ty::FnPtr(sig_tys, hdr) => Some(ExprFnSig::Sig(sig_tys.with(hdr), None)),
658-
ty::Dynamic(bounds, _, _) => {
658+
ty::Dynamic(bounds, _) => {
659659
let lang_items = cx.tcx.lang_items();
660660
match bounds.principal() {
661661
Some(bound)
@@ -826,7 +826,7 @@ pub fn for_each_top_level_late_bound_region<B>(
826826
impl<'tcx, B, F: FnMut(BoundRegion) -> ControlFlow<B>> TypeVisitor<TyCtxt<'tcx>> for V<F> {
827827
type Result = ControlFlow<B>;
828828
fn visit_region(&mut self, r: Region<'tcx>) -> Self::Result {
829-
if let RegionKind::ReBound(idx, bound) = r.kind()
829+
if let RegionKind::ReBound(BoundVarIndexKind::Bound(idx), bound) = r.kind()
830830
&& idx.as_u32() == self.index
831831
{
832832
(self.f)(bound)

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[toolchain]
22
# begin autogenerated nightly
3-
channel = "nightly-2025-09-18"
3+
channel = "nightly-2025-10-06"
44
# end autogenerated nightly
55
components = ["cargo", "llvm-tools", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"]
66
profile = "minimal"

tests/missing-test-files.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![warn(rust_2018_idioms, unused_lifetimes)]
22
#![allow(clippy::assertions_on_constants)]
3-
#![cfg_attr(bootstrap, feature(path_file_prefix))]
43

54
use std::cmp::Ordering;
65
use std::ffi::OsStr;

0 commit comments

Comments
 (0)