Skip to content

Commit 015e81d

Browse files
authored
Merge pull request #19269 from lnicola/sync-from-rust
minor: sync from downstream
2 parents c6a7251 + 24c480e commit 015e81d

File tree

3,914 files changed

+53336
-30125
lines changed

Some content is hidden

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

3,914 files changed

+53336
-30125
lines changed

.github/workflows/ci.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file defines our primary CI workflow that runs on pull requests
22
# and also on pushes to special branches (auto, try).
33
#
4-
# The actual definition of the executed jobs is calculated by a Python
5-
# script located at src/ci/github-actions/ci.py, which
4+
# The actual definition of the executed jobs is calculated by the
5+
# `src/ci/citool` crate, which
66
# uses job definition data from src/ci/github-actions/jobs.yml.
77
# You should primarily modify the `jobs.yml` file if you want to modify
88
# what jobs are executed in CI.
@@ -56,7 +56,10 @@ jobs:
5656
- name: Calculate the CI job matrix
5757
env:
5858
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
59-
run: python3 src/ci/github-actions/ci.py calculate-job-matrix >> $GITHUB_OUTPUT
59+
run: |
60+
cd src/ci/citool
61+
cargo test
62+
cargo run calculate-job-matrix >> $GITHUB_OUTPUT
6063
id: jobs
6164
job:
6265
name: ${{ matrix.full_name }}
@@ -179,6 +182,20 @@ jobs:
179182
- name: show the current environment
180183
run: src/ci/scripts/dump-environment.sh
181184

185+
# Temporary fix to unblock CI
186+
# Remove the latest Windows SDK for 32-bit Windows MSVC builds.
187+
# See issue https://github.com/rust-lang/rust/issues/137733 for more details.
188+
- name: Remove Windows SDK 10.0.26100.0
189+
shell: powershell
190+
if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }}
191+
run: |
192+
$kits = (Get-ItemProperty -path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots').KitsRoot10
193+
$sdk_version = "10.0.26100.0"
194+
195+
foreach ($kind in 'Bin', 'Lib', 'Include') {
196+
Remove-Item -Force -Recurse $kits\$kind\$sdk_version -ErrorAction Continue
197+
}
198+
182199
- name: run the build
183200
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
184201
run: src/ci/scripts/run-build-from-ci.sh 2>&1

Cargo.lock

+28-15
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ dependencies = [
358358
"cargo_metadata 0.18.1",
359359
"directories",
360360
"rustc-build-sysroot",
361-
"rustc_tools_util",
361+
"rustc_tools_util 0.4.0",
362362
"rustc_version",
363363
"serde",
364364
"serde_json",
@@ -407,9 +407,9 @@ version = "0.1.0"
407407

408408
[[package]]
409409
name = "cc"
410-
version = "1.2.13"
410+
version = "1.2.16"
411411
source = "registry+https://github.com/rust-lang/crates.io-index"
412-
checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
412+
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
413413
dependencies = [
414414
"shlex",
415415
]
@@ -522,7 +522,7 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
522522

523523
[[package]]
524524
name = "clippy"
525-
version = "0.1.86"
525+
version = "0.1.87"
526526
dependencies = [
527527
"anstream",
528528
"cargo_metadata 0.18.1",
@@ -539,7 +539,7 @@ dependencies = [
539539
"quote",
540540
"regex",
541541
"rinja",
542-
"rustc_tools_util",
542+
"rustc_tools_util 0.4.2",
543543
"serde",
544544
"serde_json",
545545
"syn 2.0.96",
@@ -553,7 +553,7 @@ dependencies = [
553553

554554
[[package]]
555555
name = "clippy_config"
556-
version = "0.1.86"
556+
version = "0.1.87"
557557
dependencies = [
558558
"clippy_utils",
559559
"itertools",
@@ -578,7 +578,7 @@ dependencies = [
578578

579579
[[package]]
580580
name = "clippy_lints"
581-
version = "0.1.86"
581+
version = "0.1.87"
582582
dependencies = [
583583
"arrayvec",
584584
"cargo_metadata 0.18.1",
@@ -601,7 +601,7 @@ dependencies = [
601601

602602
[[package]]
603603
name = "clippy_utils"
604-
version = "0.1.86"
604+
version = "0.1.87"
605605
dependencies = [
606606
"arrayvec",
607607
"itertools",
@@ -3207,6 +3207,7 @@ dependencies = [
32073207
"rustc_abi",
32083208
"rustc_ast",
32093209
"rustc_ast_pretty",
3210+
"rustc_attr_parsing",
32103211
"rustc_data_structures",
32113212
"rustc_errors",
32123213
"rustc_feature",
@@ -3215,6 +3216,7 @@ dependencies = [
32153216
"rustc_index",
32163217
"rustc_macros",
32173218
"rustc_middle",
3219+
"rustc_parse",
32183220
"rustc_session",
32193221
"rustc_span",
32203222
"rustc_target",
@@ -3263,14 +3265,10 @@ dependencies = [
32633265
"rustc_ast",
32643266
"rustc_ast_pretty",
32653267
"rustc_data_structures",
3266-
"rustc_errors",
3267-
"rustc_feature",
3268-
"rustc_fluent_macro",
3269-
"rustc_lexer",
32703268
"rustc_macros",
32713269
"rustc_serialize",
3272-
"rustc_session",
32733270
"rustc_span",
3271+
"thin-vec",
32743272
]
32753273

32763274
[[package]]
@@ -3285,11 +3283,13 @@ dependencies = [
32853283
"rustc_errors",
32863284
"rustc_feature",
32873285
"rustc_fluent_macro",
3286+
"rustc_hir",
32883287
"rustc_lexer",
32893288
"rustc_macros",
32903289
"rustc_serialize",
32913290
"rustc_session",
32923291
"rustc_span",
3292+
"thin-vec",
32933293
]
32943294

32953295
[[package]]
@@ -3342,6 +3342,7 @@ dependencies = [
33423342
"rustc_expand",
33433343
"rustc_feature",
33443344
"rustc_fluent_macro",
3345+
"rustc_hir",
33453346
"rustc_index",
33463347
"rustc_lexer",
33473348
"rustc_lint_defs",
@@ -3598,6 +3599,7 @@ dependencies = [
35983599
"rustc_abi",
35993600
"rustc_ast",
36003601
"rustc_ast_pretty",
3602+
"rustc_attr_data_structures",
36013603
"rustc_data_structures",
36023604
"rustc_error_codes",
36033605
"rustc_error_messages",
@@ -3632,6 +3634,7 @@ dependencies = [
36323634
"rustc_errors",
36333635
"rustc_feature",
36343636
"rustc_fluent_macro",
3637+
"rustc_hir",
36353638
"rustc_lexer",
36363639
"rustc_lint_defs",
36373640
"rustc_macros",
@@ -3690,6 +3693,7 @@ dependencies = [
36903693
"rustc_abi",
36913694
"rustc_arena",
36923695
"rustc_ast",
3696+
"rustc_attr_data_structures",
36933697
"rustc_data_structures",
36943698
"rustc_hashes",
36953699
"rustc_index",
@@ -3737,6 +3741,7 @@ dependencies = [
37373741
"rustc_abi",
37383742
"rustc_ast",
37393743
"rustc_ast_pretty",
3744+
"rustc_attr_parsing",
37403745
"rustc_hir",
37413746
"rustc_span",
37423747
]
@@ -3911,6 +3916,7 @@ dependencies = [
39113916
"rustc_target",
39123917
"rustc_trait_selection",
39133918
"rustc_type_ir",
3919+
"smallvec",
39143920
"tracing",
39153921
"unicode-security",
39163922
]
@@ -4244,6 +4250,7 @@ name = "rustc_query_impl"
42444250
version = "0.0.0"
42454251
dependencies = [
42464252
"measureme",
4253+
"rustc_attr_data_structures",
42474254
"rustc_data_structures",
42484255
"rustc_errors",
42494256
"rustc_hashes",
@@ -4266,6 +4273,7 @@ dependencies = [
42664273
"rustc-rayon-core",
42674274
"rustc_abi",
42684275
"rustc_ast",
4276+
"rustc_attr_data_structures",
42694277
"rustc_data_structures",
42704278
"rustc_errors",
42714279
"rustc_feature",
@@ -4316,6 +4324,7 @@ version = "0.0.0"
43164324
dependencies = [
43174325
"bitflags",
43184326
"rustc_abi",
4327+
"rustc_ast",
43194328
"rustc_data_structures",
43204329
"rustc_hir",
43214330
"rustc_middle",
@@ -4412,6 +4421,7 @@ dependencies = [
44124421
"punycode",
44134422
"rustc-demangle",
44144423
"rustc_abi",
4424+
"rustc_ast",
44154425
"rustc_data_structures",
44164426
"rustc_errors",
44174427
"rustc_hashes",
@@ -4444,6 +4454,10 @@ version = "0.4.0"
44444454
source = "registry+https://github.com/rust-lang/crates.io-index"
44454455
checksum = "3316159ab19e19d1065ecc49278e87f767a9dae9fae80348d2b4d4fa4ae02d4d"
44464456

4457+
[[package]]
4458+
name = "rustc_tools_util"
4459+
version = "0.4.2"
4460+
44474461
[[package]]
44484462
name = "rustc_trait_selection"
44494463
version = "0.0.0"
@@ -4491,8 +4505,6 @@ dependencies = [
44914505
"rustc_abi",
44924506
"rustc_data_structures",
44934507
"rustc_hir",
4494-
"rustc_infer",
4495-
"rustc_macros",
44964508
"rustc_middle",
44974509
"rustc_span",
44984510
"tracing",
@@ -4571,6 +4583,7 @@ dependencies = [
45714583
"itertools",
45724584
"minifier",
45734585
"pulldown-cmark 0.9.6",
4586+
"pulldown-cmark-escape",
45744587
"regex",
45754588
"rinja",
45764589
"rustdoc-json-types",

compiler/rustc_abi/src/callconv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
7474
Ok(HomogeneousAggregate::Homogeneous(Reg { kind, size: self.size }))
7575
}
7676

77-
BackendRepr::Vector { .. } => {
77+
BackendRepr::SimdVector { .. } => {
7878
assert!(!self.is_zst());
7979
Ok(HomogeneousAggregate::Homogeneous(Reg {
8080
kind: RegKind::Vector,

compiler/rustc_abi/src/layout.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,15 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
386386
BackendRepr::Memory { sized: true }
387387
}
388388
// Vectors require at least element alignment, else disable the opt
389-
BackendRepr::Vector { element, count: _ } if element.align(dl).abi > align.abi => {
389+
BackendRepr::SimdVector { element, count: _ }
390+
if element.align(dl).abi > align.abi =>
391+
{
390392
BackendRepr::Memory { sized: true }
391393
}
392394
// the alignment tests passed and we can use this
393395
BackendRepr::Scalar(..)
394396
| BackendRepr::ScalarPair(..)
395-
| BackendRepr::Vector { .. }
397+
| BackendRepr::SimdVector { .. }
396398
| BackendRepr::Memory { .. } => repr,
397399
},
398400
};
@@ -464,7 +466,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
464466
hide_niches(a);
465467
hide_niches(b);
466468
}
467-
BackendRepr::Vector { element, count: _ } => hide_niches(element),
469+
BackendRepr::SimdVector { element, count: _ } => hide_niches(element),
468470
BackendRepr::Memory { sized: _ } => {}
469471
}
470472
st.largest_niche = None;
@@ -1314,7 +1316,9 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13141316
match field.backend_repr {
13151317
// For plain scalars, or vectors of them, we can't unpack
13161318
// newtypes for `#[repr(C)]`, as that affects C ABIs.
1317-
BackendRepr::Scalar(_) | BackendRepr::Vector { .. } if optimize_abi => {
1319+
BackendRepr::Scalar(_) | BackendRepr::SimdVector { .. }
1320+
if optimize_abi =>
1321+
{
13181322
abi = field.backend_repr;
13191323
}
13201324
// But scalar pairs are Rust-specific and get

compiler/rustc_abi/src/layout/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
219219
C: HasDataLayout,
220220
{
221221
match self.backend_repr {
222-
BackendRepr::Vector { .. } => self.size == expected_size,
222+
BackendRepr::SimdVector { .. } => self.size == expected_size,
223223
BackendRepr::Memory { .. } => {
224224
if self.fields.count() == 1 && self.fields.offset(0).bytes() == 0 {
225225
self.field(cx, 0).is_single_vector_element(cx, expected_size)

0 commit comments

Comments
 (0)