Skip to content

Commit 7db4177

Browse files
authored
Merge pull request #2464 from rust-lang/rustc-pull
Rustc pull update
2 parents 32560d7 + 6da0ebf commit 7db4177

File tree

498 files changed

+8928
-5903
lines changed

Some content is hidden

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

498 files changed

+8928
-5903
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ name: CI
1111
on:
1212
push:
1313
branches:
14+
# CI on master only serves for caching citool builds for the `calculate_matrix` job.
15+
# In order to use GHA cache on PR CI (and auto/try) jobs, we need to write to it
16+
# from the default branch.
17+
- master
1418
- auto
1519
- try
1620
- try-perf
@@ -60,12 +64,18 @@ jobs:
6064
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
6165
with:
6266
workspaces: src/ci/citool
67+
- name: Test citool
68+
# Only test citool on the auto branch, to reduce latency of the calculate matrix job
69+
# on PR/try builds.
70+
if: ${{ github.ref == 'refs/heads/auto' }}
71+
run: |
72+
cd src/ci/citool
73+
CARGO_INCREMENTAL=0 cargo test
6374
- name: Calculate the CI job matrix
6475
env:
6576
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
6677
run: |
6778
cd src/ci/citool
68-
CARGO_INCREMENTAL=0 cargo test
6979
CARGO_INCREMENTAL=0 cargo run calculate-job-matrix >> $GITHUB_OUTPUT
7080
id: jobs
7181
job:

Cargo.lock

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ version = "0.4.2"
162162
source = "registry+https://github.com/rust-lang/crates.io-index"
163163
checksum = "01667f6f40216b9a0b2945e05fed5f1ad0ab6470e69cb9378001e37b1c0668e4"
164164
dependencies = [
165-
"object",
165+
"object 0.36.7",
166166
]
167167

168168
[[package]]
@@ -235,7 +235,7 @@ dependencies = [
235235
"cfg-if",
236236
"libc",
237237
"miniz_oxide",
238-
"object",
238+
"object 0.36.7",
239239
"rustc-demangle",
240240
"windows-targets 0.52.6",
241241
]
@@ -2326,7 +2326,6 @@ dependencies = [
23262326
"tempfile",
23272327
"tikv-jemalloc-sys",
23282328
"ui_test",
2329-
"windows-sys 0.59.0",
23302329
]
23312330

23322331
[[package]]
@@ -2509,7 +2508,19 @@ dependencies = [
25092508
"indexmap",
25102509
"memchr",
25112510
"ruzstd",
2512-
"wasmparser 0.222.1",
2511+
]
2512+
2513+
[[package]]
2514+
name = "object"
2515+
version = "0.37.0"
2516+
source = "registry+https://github.com/rust-lang/crates.io-index"
2517+
checksum = "6273adb7096cf9ab4335f258e627d8230e69d40d45567d678f552dcec6245215"
2518+
dependencies = [
2519+
"crc32fast",
2520+
"hashbrown",
2521+
"indexmap",
2522+
"memchr",
2523+
"wasmparser 0.232.0",
25132524
]
25142525

25152526
[[package]]
@@ -3109,7 +3120,7 @@ dependencies = [
31093120
"build_helper",
31103121
"gimli",
31113122
"libc",
3112-
"object",
3123+
"object 0.36.7",
31133124
"regex",
31143125
"serde_json",
31153126
"similar",
@@ -3118,11 +3129,12 @@ dependencies = [
31183129

31193130
[[package]]
31203131
name = "rustc-build-sysroot"
3121-
version = "0.5.7"
3132+
version = "0.5.8"
31223133
source = "registry+https://github.com/rust-lang/crates.io-index"
3123-
checksum = "10edc2e4393515193bd766e2f6c050b0536a68e56f2b6d56c07ababfdc114ff0"
3134+
checksum = "16d115ad7e26e0d1337f64ae6598f758194696afc2e9f34c8a6f24582529c3dc"
31243135
dependencies = [
31253136
"anyhow",
3137+
"regex",
31263138
"rustc_version",
31273139
"tempfile",
31283140
"walkdir",
@@ -3422,7 +3434,7 @@ dependencies = [
34223434
"itertools",
34233435
"libc",
34243436
"measureme",
3425-
"object",
3437+
"object 0.37.0",
34263438
"rustc-demangle",
34273439
"rustc_abi",
34283440
"rustc_ast",
@@ -3463,7 +3475,7 @@ dependencies = [
34633475
"either",
34643476
"itertools",
34653477
"libc",
3466-
"object",
3478+
"object 0.37.0",
34673479
"pathdiff",
34683480
"regex",
34693481
"rustc_abi",
@@ -3640,6 +3652,7 @@ dependencies = [
36403652
"rustc_macros",
36413653
"rustc_serialize",
36423654
"rustc_span",
3655+
"smallvec",
36433656
"tracing",
36443657
"unic-langid",
36453658
]
@@ -3786,6 +3799,7 @@ dependencies = [
37863799
"rustc_middle",
37873800
"rustc_session",
37883801
"rustc_span",
3802+
"rustc_target",
37893803
"rustc_trait_selection",
37903804
"smallvec",
37913805
"tracing",
@@ -4495,7 +4509,7 @@ name = "rustc_target"
44954509
version = "0.0.0"
44964510
dependencies = [
44974511
"bitflags",
4498-
"object",
4512+
"object 0.37.0",
44994513
"rustc_abi",
45004514
"rustc_data_structures",
45014515
"rustc_fs_util",
@@ -5247,7 +5261,7 @@ checksum = "9e9c1e705f82a260173f3eec93f2ff6d7807f23ad5a8cc2e7316a891733ea7a1"
52475261
dependencies = [
52485262
"gimli",
52495263
"hashbrown",
5250-
"object",
5264+
"object 0.36.7",
52515265
"tracing",
52525266
]
52535267

@@ -5908,15 +5922,6 @@ dependencies = [
59085922
"indexmap",
59095923
]
59105924

5911-
[[package]]
5912-
name = "wasmparser"
5913-
version = "0.222.1"
5914-
source = "registry+https://github.com/rust-lang/crates.io-index"
5915-
checksum = "fa210fd1788e6b37a1d1930f3389c48e1d6ebd1a013d34fa4b7f9e3e3bf03146"
5916-
dependencies = [
5917-
"bitflags",
5918-
]
5919-
59205925
[[package]]
59215926
name = "wasmparser"
59225927
version = "0.229.0"
@@ -5941,6 +5946,15 @@ dependencies = [
59415946
"semver",
59425947
]
59435948

5949+
[[package]]
5950+
name = "wasmparser"
5951+
version = "0.232.0"
5952+
source = "registry+https://github.com/rust-lang/crates.io-index"
5953+
checksum = "917739b33bb1eb0e9a49bcd2637a351931be4578d0cc4d37b908d7a797784fbb"
5954+
dependencies = [
5955+
"bitflags",
5956+
]
5957+
59445958
[[package]]
59455959
name = "wast"
59465960
version = "230.0.0"

compiler/rustc_abi/src/layout.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_index::bit_set::BitMatrix;
88
use tracing::debug;
99

1010
use crate::{
11-
AbiAndPrefAlign, Align, BackendRepr, FieldsShape, HasDataLayout, IndexSlice, IndexVec, Integer,
11+
AbiAlign, Align, BackendRepr, FieldsShape, HasDataLayout, IndexSlice, IndexVec, Integer,
1212
LayoutData, Niche, NonZeroUsize, Primitive, ReprOptions, Scalar, Size, StructKind, TagEncoding,
1313
Variants, WrappingRange,
1414
};
@@ -173,13 +173,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
173173
// Non-power-of-two vectors have padding up to the next power-of-two.
174174
// If we're a packed repr, remove the padding while keeping the alignment as close
175175
// to a vector as possible.
176-
(
177-
BackendRepr::Memory { sized: true },
178-
AbiAndPrefAlign {
179-
abi: Align::max_aligned_factor(size),
180-
pref: dl.llvmlike_vector_align(size).pref,
181-
},
182-
)
176+
(BackendRepr::Memory { sized: true }, AbiAlign { abi: Align::max_aligned_factor(size) })
183177
} else {
184178
(BackendRepr::SimdVector { element: e_repr, count }, dl.llvmlike_vector_align(size))
185179
};
@@ -435,13 +429,13 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
435429
}
436430

437431
if let Some(pack) = repr.pack {
438-
align = align.min(AbiAndPrefAlign::new(pack));
432+
align = align.min(AbiAlign::new(pack));
439433
}
440434
// The unadjusted ABI alignment does not include repr(align), but does include repr(pack).
441435
// See documentation on `LayoutS::unadjusted_abi_align`.
442436
let unadjusted_abi_align = align.abi;
443437
if let Some(repr_align) = repr.align {
444-
align = align.max(AbiAndPrefAlign::new(repr_align));
438+
align = align.max(AbiAlign::new(repr_align));
445439
}
446440
// `align` must not be modified after this, or `unadjusted_abi_align` could be inaccurate.
447441
let align = align;
@@ -1289,7 +1283,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
12891283
if let StructKind::Prefixed(prefix_size, prefix_align) = kind {
12901284
let prefix_align =
12911285
if let Some(pack) = pack { prefix_align.min(pack) } else { prefix_align };
1292-
align = align.max(AbiAndPrefAlign::new(prefix_align));
1286+
align = align.max(AbiAlign::new(prefix_align));
12931287
offset = prefix_size.align_to(prefix_align);
12941288
}
12951289
for &i in &inverse_memory_index {
@@ -1308,7 +1302,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13081302

13091303
// Invariant: offset < dl.obj_size_bound() <= 1<<61
13101304
let field_align = if let Some(pack) = pack {
1311-
field.align.min(AbiAndPrefAlign::new(pack))
1305+
field.align.min(AbiAlign::new(pack))
13121306
} else {
13131307
field.align
13141308
};
@@ -1342,7 +1336,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13421336
// See documentation on `LayoutS::unadjusted_abi_align`.
13431337
let unadjusted_abi_align = align.abi;
13441338
if let Some(repr_align) = repr.align {
1345-
align = align.max(AbiAndPrefAlign::new(repr_align));
1339+
align = align.max(AbiAlign::new(repr_align));
13461340
}
13471341
// `align` must not be modified after this point, or `unadjusted_abi_align` could be inaccurate.
13481342
let align = align;

compiler/rustc_abi/src/layout/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_data_structures::intern::Interned;
55
use rustc_macros::HashStable_Generic;
66

77
use crate::{
8-
AbiAndPrefAlign, Align, BackendRepr, FieldsShape, Float, HasDataLayout, LayoutData, Niche,
8+
AbiAlign, Align, BackendRepr, FieldsShape, Float, HasDataLayout, LayoutData, Niche,
99
PointeeInfo, Primitive, Scalar, Size, TargetDataLayout, Variants,
1010
};
1111

@@ -100,7 +100,7 @@ impl<'a> Layout<'a> {
100100
self.0.0.largest_niche
101101
}
102102

103-
pub fn align(self) -> AbiAndPrefAlign {
103+
pub fn align(self) -> AbiAlign {
104104
self.0.0.align
105105
}
106106

0 commit comments

Comments
 (0)