Skip to content

Commit bd940e3

Browse files
authored
Merge pull request #4713 from rust-lang/rustup-2025-11-20
Automatic Rustup
2 parents 7746692 + 4f00c22 commit bd940e3

File tree

348 files changed

+12067
-5011
lines changed

Some content is hidden

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

348 files changed

+12067
-5011
lines changed

.mailmap

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,10 @@ Martin Habovštiak <martin.habovstiak@gmail.com>
448448
Martin Hafskjold Thoresen <martinhath@gmail.com>
449449
Martin Nordholts <martin.nordholts@codetale.se> <enselic@gmail.com>
450450
Matej Lach <matej.lach@gmail.com> Matej Ľach <matej.lach@gmail.com>
451-
Mateusz Mikuła <mati865@gmail.com>
452-
Mateusz Mikuła <mati865@gmail.com> <mati865@users.noreply.github.com>
453-
Mateusz Mikuła <mati865@gmail.com> <matti@marinelayer.io>
451+
Mateusz Mikuła <oss@mateuszmikula.dev>
452+
Mateusz Mikuła <oss@mateuszmikula.dev> <mati865@gmail.com>
453+
Mateusz Mikuła <oss@mateuszmikula.dev> <mati865@users.noreply.github.com>
454+
Mateusz Mikuła <oss@mateuszmikula.dev> <matti@marinelayer.io>
454455
Matt Brubeck <mbrubeck@limpet.net> <mbrubeck@cs.hmc.edu>
455456
Matthew Auld <matthew.auld@intel.com>
456457
Matthew Jasper <mjjasper1@gmail.com>
@@ -596,7 +597,7 @@ Rui <xiongmao86dev@sina.com>
596597
Russell Johnston <rpjohnst@gmail.com>
597598
Rustin-Liu <rustin.liu@gmail.com>
598599
Rusty Blitzerr <rusty.blitzerr@gmail.com>
599-
RustyYato <krishna.sd.2012@gmail.com>
600+
RustyYato <rustyyato@gmail.com>
600601
Ruud van Asseldonk <dev@veniogames.com> Ruud van Asseldonk <ruuda@google.com>
601602
Ryan Leung <rleungx@gmail.com>
602603
Ryan Levick <me@ryanlevick.com> <rylev@users.noreply.github.com>

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ path = [
3838
"triagebot.toml",
3939
"typos.toml",
4040
"package.json",
41-
"package-lock.json",
41+
"yarn.lock",
4242
"x",
4343
"x.ps1",
4444
"x.py",

bootstrap.example.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@
315315
# target when running tests, otherwise this can be omitted.
316316
#build.nodejs = "node"
317317

318-
# The npm executable to use. Note that this is used for rustdoc-gui tests,
319-
# otherwise this can be omitted.
318+
# The yarn executable to use. Note that this is used for rustdoc-gui tests and
319+
# tidy js extra-checks, otherwise this can be omitted.
320320
#
321-
# Under Windows this should be `npm.cmd` or path to it (verified on nodejs v18.06), or
321+
# Under Windows this should be `yarn.cmd` or path to it (verified on nodejs v18.06), or
322322
# error will be emitted.
323-
#build.npm = "npm"
323+
#build.yarn = "yarn"
324324

325325
# Python interpreter to use for various tasks throughout the build, notably
326326
# rustdoc tests, and some dist bits and pieces.
@@ -831,6 +831,11 @@
831831
# If an explicit setting is given, it will be used for all parts of the codebase.
832832
#rust.new-symbol-mangling = true|false (see comment)
833833

834+
# Size limit in bytes for move/copy annotations (-Zannotate-moves). Only types
835+
# at or above this size will be annotated. If not specified, uses the default
836+
# limit (65 bytes).
837+
#rust.annotate-moves-size-limit = 65
838+
834839
# Select LTO mode that will be used for compiling rustc. By default, thin local LTO
835840
# (LTO within a single crate) is used (like for any Rust crate). You can also select
836841
# "thin" or "fat" to apply Thin/Fat LTO to the `rustc_driver` dylib, or "off" to disable

compiler/rustc_ast/src/ast.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3699,6 +3699,7 @@ pub struct TyAlias {
36993699
#[derive(Clone, Encodable, Decodable, Debug)]
37003700
pub struct Impl {
37013701
pub generics: Generics,
3702+
pub constness: Const,
37023703
pub of_trait: Option<Box<TraitImplHeader>>,
37033704
pub self_ty: Box<Ty>,
37043705
pub items: ThinVec<Box<AssocItem>>,
@@ -3708,7 +3709,6 @@ pub struct Impl {
37083709
pub struct TraitImplHeader {
37093710
pub defaultness: Defaultness,
37103711
pub safety: Safety,
3711-
pub constness: Const,
37123712
pub polarity: ImplPolarity,
37133713
pub trait_ref: TraitRef,
37143714
}
@@ -4103,9 +4103,9 @@ mod size_asserts {
41034103
static_assert_size!(GenericArg, 24);
41044104
static_assert_size!(GenericBound, 88);
41054105
static_assert_size!(Generics, 40);
4106-
static_assert_size!(Impl, 64);
4107-
static_assert_size!(Item, 136);
4108-
static_assert_size!(ItemKind, 72);
4106+
static_assert_size!(Impl, 80);
4107+
static_assert_size!(Item, 152);
4108+
static_assert_size!(ItemKind, 88);
41094109
static_assert_size!(LitKind, 24);
41104110
static_assert_size!(Local, 96);
41114111
static_assert_size!(MetaItemLit, 40);
@@ -4116,7 +4116,7 @@ mod size_asserts {
41164116
static_assert_size!(PathSegment, 24);
41174117
static_assert_size!(Stmt, 32);
41184118
static_assert_size!(StmtKind, 16);
4119-
static_assert_size!(TraitImplHeader, 80);
4119+
static_assert_size!(TraitImplHeader, 72);
41204120
static_assert_size!(Ty, 64);
41214121
static_assert_size!(TyKind, 40);
41224122
// tidy-alphabetical-end

compiler/rustc_ast/src/visit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,11 +934,11 @@ macro_rules! common_visitor_and_walkers {
934934
}
935935

936936
impl_walkable!(|&$($mut)? $($lt)? self: Impl, vis: &mut V| {
937-
let Impl { generics, of_trait, self_ty, items } = self;
937+
let Impl { generics, of_trait, self_ty, items, constness: _ } = self;
938938
try_visit!(vis.visit_generics(generics));
939939
if let Some(box of_trait) = of_trait {
940-
let TraitImplHeader { defaultness, safety, constness, polarity, trait_ref } = of_trait;
941-
visit_visitable!($($mut)? vis, defaultness, safety, constness, polarity, trait_ref);
940+
let TraitImplHeader { defaultness, safety, polarity, trait_ref } = of_trait;
941+
visit_visitable!($($mut)? vis, defaultness, safety, polarity, trait_ref);
942942
}
943943
try_visit!(vis.visit_ty(self_ty));
944944
visit_visitable_with!($($mut)? vis, items, AssocCtxt::Impl { of_trait: of_trait.is_some() });

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
344344
of_trait,
345345
self_ty: ty,
346346
items: impl_items,
347+
constness,
347348
}) => {
348349
// Lower the "impl header" first. This ordering is important
349350
// for in-band lifetimes! Consider `'a` here:
@@ -377,11 +378,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
377378
.arena
378379
.alloc_from_iter(impl_items.iter().map(|item| self.lower_impl_item_ref(item)));
379380

381+
let constness = self.lower_constness(*constness);
382+
380383
hir::ItemKind::Impl(hir::Impl {
381384
generics,
382385
of_trait,
383386
self_ty: lowered_ty,
384387
items: new_impl_items,
388+
constness,
385389
})
386390
}
387391
ItemKind::Trait(box Trait {
@@ -954,9 +958,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
954958
&mut self,
955959
trait_impl_header: &TraitImplHeader,
956960
) -> &'hir hir::TraitImplHeader<'hir> {
957-
let TraitImplHeader { constness, safety, polarity, defaultness, ref trait_ref } =
958-
*trait_impl_header;
959-
let constness = self.lower_constness(constness);
961+
let TraitImplHeader { safety, polarity, defaultness, ref trait_ref } = *trait_impl_header;
960962
let safety = self.lower_safety(safety, hir::Safety::Safe);
961963
let polarity = match polarity {
962964
ImplPolarity::Positive => ImplPolarity::Positive,
@@ -979,7 +981,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
979981
);
980982

981983
self.arena.alloc(hir::TraitImplHeader {
982-
constness,
983984
safety,
984985
polarity,
985986
defaultness,

compiler/rustc_ast_passes/messages.ftl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ ast_passes_generic_before_constraints = generic arguments must come before the f
204204
205205
ast_passes_generic_default_trailing = generic parameters with a default must be trailing
206206
207+
ast_passes_impl_fn_const =
208+
redundant `const` fn marker in const impl
209+
.parent_constness = this declares all associated functions implicitly const
210+
.label = remove the `const`
211+
207212
ast_passes_incompatible_features = `{$f1}` and `{$f2}` are incompatible, using them at the same time is not allowed
208213
.help = remove one of these features
209214

0 commit comments

Comments
 (0)