Skip to content

Commit 817e725

Browse files
authored
Merge pull request rust-lang#4277 from rust-lang/rustup-2025-04-17
Automatic Rustup
2 parents 2a94b1c + 2602dd9 commit 817e725

File tree

1,042 files changed

+11078
-6943
lines changed

Some content is hidden

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

1,042 files changed

+11078
-6943
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ ec2cc761bc7067712ecc7734502f703fe3b024c8
3131
c682aa162b0d41e21cc6748f4fecfe01efb69d1f
3232
# reformat with updated edition 2024
3333
1fcae03369abb4c2cc180cd5a49e1f4440a81300
34+
# Breaking up of compiletest runtest.rs
35+
60600a6fa403216bfd66e04f948b1822f6450af7

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ jobs:
5353
steps:
5454
- name: Checkout the source code
5555
uses: actions/checkout@v4
56+
# Cache citool to make its build faster, as it's in the critical path.
57+
# The rust-cache doesn't bleed into the main `job`, so it should not affect any other
58+
# Rust compilation.
59+
- name: Cache citool
60+
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
61+
with:
62+
workspaces: src/ci/citool
5663
- name: Calculate the CI job matrix
5764
env:
5865
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ James Hinshelwood <[email protected]> <[email protected]>
292292
293293
James Perry <[email protected]>
294294
James Sanderson <[email protected]>
295+
295296
Jana Dönszelmann <[email protected]>
296297
297298

Cargo.lock

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ version = "0.0.0"
719719
dependencies = [
720720
"anstyle-svg",
721721
"build_helper",
722+
"camino",
722723
"colored",
723724
"diff",
724725
"getopts",
@@ -931,15 +932,6 @@ dependencies = [
931932
"winapi",
932933
]
933934

934-
[[package]]
935-
name = "deranged"
936-
version = "0.4.0"
937-
source = "registry+https://github.com/rust-lang/crates.io-index"
938-
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
939-
dependencies = [
940-
"powerfmt",
941-
]
942-
943935
[[package]]
944936
name = "derive-where"
945937
version = "1.2.7"
@@ -1221,7 +1213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
12211213
checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"
12221214
dependencies = [
12231215
"crc32fast",
1224-
"miniz_oxide 0.8.7",
1216+
"miniz_oxide 0.8.8",
12251217
]
12261218

12271219
[[package]]
@@ -2291,9 +2283,9 @@ dependencies = [
22912283

22922284
[[package]]
22932285
name = "miniz_oxide"
2294-
version = "0.8.7"
2286+
version = "0.8.8"
22952287
source = "registry+https://github.com/rust-lang/crates.io-index"
2296-
checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430"
2288+
checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a"
22972289
dependencies = [
22982290
"adler2",
22992291
]
@@ -2425,12 +2417,6 @@ dependencies = [
24252417
"num-traits",
24262418
]
24272419

2428-
[[package]]
2429-
name = "num-conv"
2430-
version = "0.1.0"
2431-
source = "registry+https://github.com/rust-lang/crates.io-index"
2432-
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
2433-
24342420
[[package]]
24352421
name = "num-integer"
24362422
version = "0.1.46"
@@ -2808,12 +2794,6 @@ dependencies = [
28082794
"portable-atomic",
28092795
]
28102796

2811-
[[package]]
2812-
name = "powerfmt"
2813-
version = "0.2.0"
2814-
source = "registry+https://github.com/rust-lang/crates.io-index"
2815-
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
2816-
28172797
[[package]]
28182798
name = "ppv-lite86"
28192799
version = "0.2.21"
@@ -3616,6 +3596,7 @@ name = "rustc_driver_impl"
36163596
version = "0.0.0"
36173597
dependencies = [
36183598
"ctrlc",
3599+
"jiff",
36193600
"libc",
36203601
"rustc_abi",
36213602
"rustc_ast",
@@ -3662,7 +3643,6 @@ dependencies = [
36623643
"rustc_ty_utils",
36633644
"serde_json",
36643645
"shlex",
3665-
"time",
36663646
"tracing",
36673647
"windows 0.59.0",
36683648
]
@@ -4692,6 +4672,7 @@ name = "rustdoc-gui-test"
46924672
version = "0.1.0"
46934673
dependencies = [
46944674
"build_helper",
4675+
"camino",
46954676
"compiletest",
46964677
"getopts",
46974678
"walkdir",
@@ -5356,37 +5337,6 @@ dependencies = [
53565337
"libc",
53575338
]
53585339

5359-
[[package]]
5360-
name = "time"
5361-
version = "0.3.41"
5362-
source = "registry+https://github.com/rust-lang/crates.io-index"
5363-
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
5364-
dependencies = [
5365-
"deranged",
5366-
"itoa",
5367-
"num-conv",
5368-
"powerfmt",
5369-
"serde",
5370-
"time-core",
5371-
"time-macros",
5372-
]
5373-
5374-
[[package]]
5375-
name = "time-core"
5376-
version = "0.1.4"
5377-
source = "registry+https://github.com/rust-lang/crates.io-index"
5378-
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
5379-
5380-
[[package]]
5381-
name = "time-macros"
5382-
version = "0.2.22"
5383-
source = "registry+https://github.com/rust-lang/crates.io-index"
5384-
checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
5385-
dependencies = [
5386-
"num-conv",
5387-
"time-core",
5388-
]
5389-
53905340
[[package]]
53915341
name = "tinystr"
53925342
version = "0.7.6"
@@ -6111,11 +6061,13 @@ dependencies = [
61116061

61126062
[[package]]
61136063
name = "windows-bindgen"
6114-
version = "0.59.0"
6064+
version = "0.61.0"
61156065
source = "registry+https://github.com/rust-lang/crates.io-index"
6116-
checksum = "9b7fb600834d7e868f6e5bb748a86101427330fafbf9485c331b9d5f562d54a5"
6066+
checksum = "ac1c59c20569610dd9ed784d5f003fb493ec57b4cf39d974eb03a84bb7156c90"
61176067
dependencies = [
61186068
"rayon",
6069+
"serde",
6070+
"serde_json",
61196071
]
61206072

61216073
[[package]]

compiler/rustc_abi/src/layout.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
315315
repr: &ReprOptions,
316316
variants: &IndexSlice<VariantIdx, IndexVec<FieldIdx, F>>,
317317
is_enum: bool,
318-
is_unsafe_cell: bool,
318+
is_special_no_niche: bool,
319319
scalar_valid_range: (Bound<u128>, Bound<u128>),
320320
discr_range_of_repr: impl Fn(i128, i128) -> (Integer, bool),
321321
discriminants: impl Iterator<Item = (VariantIdx, i128)>,
@@ -348,7 +348,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
348348
repr,
349349
variants,
350350
is_enum,
351-
is_unsafe_cell,
351+
is_special_no_niche,
352352
scalar_valid_range,
353353
always_sized,
354354
present_first,
@@ -505,7 +505,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
505505
repr: &ReprOptions,
506506
variants: &IndexSlice<VariantIdx, IndexVec<FieldIdx, F>>,
507507
is_enum: bool,
508-
is_unsafe_cell: bool,
508+
is_special_no_niche: bool,
509509
scalar_valid_range: (Bound<u128>, Bound<u128>),
510510
always_sized: bool,
511511
present_first: VariantIdx,
@@ -524,7 +524,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
524524
let mut st = self.univariant(&variants[v], repr, kind)?;
525525
st.variants = Variants::Single { index: v };
526526

527-
if is_unsafe_cell {
527+
if is_special_no_niche {
528528
let hide_niches = |scalar: &mut _| match scalar {
529529
Scalar::Initialized { value, valid_range } => {
530530
*valid_range = WrappingRange::full(value.size(dl))

compiler/rustc_ast/src/ast.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,17 @@ impl Path {
120120
Path { segments: thin_vec![PathSegment::from_ident(ident)], span: ident.span, tokens: None }
121121
}
122122

123+
pub fn is_ident(&self, name: Symbol) -> bool {
124+
if let [segment] = self.segments.as_ref()
125+
&& segment.args.is_none()
126+
&& segment.ident.name == name
127+
{
128+
true
129+
} else {
130+
false
131+
}
132+
}
133+
123134
pub fn is_global(&self) -> bool {
124135
self.segments.first().is_some_and(|segment| segment.ident.name == kw::PathRoot)
125136
}

compiler/rustc_ast/src/ast_traits.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use std::fmt;
66
use std::marker::PhantomData;
77

88
use crate::ptr::P;
9-
use crate::token::Nonterminal;
109
use crate::tokenstream::LazyAttrTokenStream;
1110
use crate::{
1211
Arm, AssocItem, AttrItem, AttrKind, AttrVec, Attribute, Block, Crate, Expr, ExprField,
@@ -206,19 +205,6 @@ impl HasTokens for Attribute {
206205
}
207206
}
208207

209-
impl HasTokens for Nonterminal {
210-
fn tokens(&self) -> Option<&LazyAttrTokenStream> {
211-
match self {
212-
Nonterminal::NtBlock(block) => block.tokens(),
213-
}
214-
}
215-
fn tokens_mut(&mut self) -> Option<&mut Option<LazyAttrTokenStream>> {
216-
match self {
217-
Nonterminal::NtBlock(block) => block.tokens_mut(),
218-
}
219-
}
220-
}
221-
222208
/// A trait for AST nodes having (or not having) attributes.
223209
pub trait HasAttrs {
224210
/// This is `true` if this `HasAttrs` might support 'custom' (proc-macro) inner

compiler/rustc_ast/src/attr/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ pub fn mk_doc_comment(
627627
Attribute { kind: AttrKind::DocComment(comment_kind, data), id: g.mk_attr_id(), style, span }
628628
}
629629

630-
pub fn mk_attr(
630+
fn mk_attr(
631631
g: &AttrIdGenerator,
632632
style: AttrStyle,
633633
unsafety: Safety,

compiler/rustc_ast/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9-
#![cfg_attr(doc, recursion_limit = "256")] // FIXME(nnethercote): will be removed by #124141
109
#![doc(
1110
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1211
test(attr(deny(warnings)))

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,9 @@ fn visit_lazy_tts<T: MutVisitor>(vis: &mut T, lazy_tts: &mut Option<LazyAttrToke
844844
visit_lazy_tts_opt_mut(vis, lazy_tts.as_mut());
845845
}
846846

847-
/// Applies ident visitor if it's an ident; applies other visits to interpolated nodes.
848-
/// In practice the ident part is not actually used by specific visitors right now,
849-
/// but there's a test below checking that it works.
847+
/// Applies ident visitor if it's an ident. In practice this is not actually
848+
/// used by specific visitors right now, but there's a test below checking that
849+
/// it works.
850850
// No `noop_` prefix because there isn't a corresponding method in `MutVisitor`.
851851
pub fn visit_token<T: MutVisitor>(vis: &mut T, t: &mut Token) {
852852
let Token { kind, span } = t;
@@ -864,45 +864,11 @@ pub fn visit_token<T: MutVisitor>(vis: &mut T, t: &mut Token) {
864864
token::NtLifetime(ident, _is_raw) => {
865865
vis.visit_ident(ident);
866866
}
867-
token::Interpolated(nt) => {
868-
let nt = Arc::make_mut(nt);
869-
visit_nonterminal(vis, nt);
870-
}
871867
_ => {}
872868
}
873869
vis.visit_span(span);
874870
}
875871

876-
// No `noop_` prefix because there isn't a corresponding method in `MutVisitor`.
877-
/// Applies the visitor to elements of interpolated nodes.
878-
//
879-
// N.B., this can occur only when applying a visitor to partially expanded
880-
// code, where parsed pieces have gotten implanted ito *other* macro
881-
// invocations. This is relevant for macro hygiene, but possibly not elsewhere.
882-
//
883-
// One problem here occurs because the types for flat_map_item, flat_map_stmt,
884-
// etc., allow the visitor to return *multiple* items; this is a problem for the
885-
// nodes here, because they insist on having exactly one piece. One solution
886-
// would be to mangle the MutVisitor trait to include one-to-many and
887-
// one-to-one versions of these entry points, but that would probably confuse a
888-
// lot of people and help very few. Instead, I'm just going to put in dynamic
889-
// checks. I think the performance impact of this will be pretty much
890-
// nonexistent. The danger is that someone will apply a `MutVisitor` to a
891-
// partially expanded node, and will be confused by the fact that their
892-
// `flat_map_item` or `flat_map_stmt` isn't getting called on `NtItem` or `NtStmt`
893-
// nodes. Hopefully they'll wind up reading this comment, and doing something
894-
// appropriate.
895-
//
896-
// BTW, design choice: I considered just changing the type of, e.g., `NtItem` to
897-
// contain multiple items, but decided against it when I looked at
898-
// `parse_item_or_view_item` and tried to figure out what I would do with
899-
// multiple items there....
900-
fn visit_nonterminal<T: MutVisitor>(vis: &mut T, nt: &mut token::Nonterminal) {
901-
match nt {
902-
token::NtBlock(block) => vis.visit_block(block),
903-
}
904-
}
905-
906872
// No `noop_` prefix because there isn't a corresponding method in `MutVisitor`.
907873
fn visit_defaultness<T: MutVisitor>(vis: &mut T, defaultness: &mut Defaultness) {
908874
match defaultness {

0 commit comments

Comments
 (0)