Skip to content

Commit 2e05a1c

Browse files
authored
Merge branch 'master' into master
2 parents 28b75c4 + 5dfe648 commit 2e05a1c

File tree

1,717 files changed

+34867
-16984
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,717 files changed

+34867
-16984
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ jobs:
235235
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
236236
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
237237
run: |
238-
npm install -g @datadog/datadog-ci@^2.x.x
239-
python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
238+
cd src/ci
239+
npm ci
240+
python3 scripts/upload-build-metrics.py ../../build/cpu-usage.csv
240241
241242
# This job isused to tell bors the final status of the build, as there is no practical way to detect
242243
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).

Cargo.lock

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
27062706
checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc"
27072707
dependencies = [
27082708
"memchr",
2709-
"thiserror 2.0.8",
2709+
"thiserror 2.0.8",
27102710
"ucd-trie",
27112711
]
27122712

@@ -3354,7 +3354,7 @@ dependencies = [
33543354
"itertools",
33553355
"rustc_ast",
33563356
"rustc_ast_pretty",
3357-
"rustc_attr",
3357+
"rustc_attr_parsing",
33583358
"rustc_data_structures",
33593359
"rustc_errors",
33603360
"rustc_feature",
@@ -3380,7 +3380,7 @@ dependencies = [
33803380
]
33813381

33823382
[[package]]
3383-
name = "rustc_attr"
3383+
name = "rustc_attr_data_structures"
33843384
version = "0.0.0"
33853385
dependencies = [
33863386
"rustc_abi",
@@ -3397,6 +3397,25 @@ dependencies = [
33973397
"rustc_span",
33983398
]
33993399

3400+
[[package]]
3401+
name = "rustc_attr_parsing"
3402+
version = "0.0.0"
3403+
dependencies = [
3404+
"rustc_abi",
3405+
"rustc_ast",
3406+
"rustc_ast_pretty",
3407+
"rustc_attr_data_structures",
3408+
"rustc_data_structures",
3409+
"rustc_errors",
3410+
"rustc_feature",
3411+
"rustc_fluent_macro",
3412+
"rustc_lexer",
3413+
"rustc_macros",
3414+
"rustc_serialize",
3415+
"rustc_session",
3416+
"rustc_span",
3417+
]
3418+
34003419
[[package]]
34013420
name = "rustc_baked_icu_data"
34023421
version = "0.0.0"
@@ -3441,7 +3460,7 @@ version = "0.0.0"
34413460
dependencies = [
34423461
"rustc_ast",
34433462
"rustc_ast_pretty",
3444-
"rustc_attr",
3463+
"rustc_attr_parsing",
34453464
"rustc_data_structures",
34463465
"rustc_errors",
34473466
"rustc_expand",
@@ -3473,7 +3492,7 @@ dependencies = [
34733492
"rustc-demangle",
34743493
"rustc_abi",
34753494
"rustc_ast",
3476-
"rustc_attr",
3495+
"rustc_attr_parsing",
34773496
"rustc_codegen_ssa",
34783497
"rustc_data_structures",
34793498
"rustc_errors",
@@ -3507,7 +3526,6 @@ dependencies = [
35073526
"cc",
35083527
"either",
35093528
"itertools",
3510-
"jobserver",
35113529
"libc",
35123530
"object 0.36.5",
35133531
"pathdiff",
@@ -3516,12 +3534,13 @@ dependencies = [
35163534
"rustc_arena",
35173535
"rustc_ast",
35183536
"rustc_ast_pretty",
3519-
"rustc_attr",
3537+
"rustc_attr_parsing",
35203538
"rustc_data_structures",
35213539
"rustc_errors",
35223540
"rustc_fluent_macro",
35233541
"rustc_fs_util",
35243542
"rustc_hir",
3543+
"rustc_hir_pretty",
35253544
"rustc_incremental",
35263545
"rustc_index",
35273546
"rustc_macros",
@@ -3553,7 +3572,7 @@ dependencies = [
35533572
"rustc_abi",
35543573
"rustc_apfloat",
35553574
"rustc_ast",
3556-
"rustc_attr",
3575+
"rustc_attr_parsing",
35573576
"rustc_data_structures",
35583577
"rustc_errors",
35593578
"rustc_fluent_macro",
@@ -3620,7 +3639,7 @@ dependencies = [
36203639
"rustc_ast_lowering",
36213640
"rustc_ast_passes",
36223641
"rustc_ast_pretty",
3623-
"rustc_attr",
3642+
"rustc_attr_parsing",
36243643
"rustc_borrowck",
36253644
"rustc_builtin_macros",
36263645
"rustc_codegen_ssa",
@@ -3724,7 +3743,7 @@ dependencies = [
37243743
"rustc_ast",
37253744
"rustc_ast_passes",
37263745
"rustc_ast_pretty",
3727-
"rustc_attr",
3746+
"rustc_attr_parsing",
37283747
"rustc_data_structures",
37293748
"rustc_errors",
37303749
"rustc_feature",
@@ -3787,6 +3806,7 @@ dependencies = [
37873806
"rustc_span",
37883807
"rustc_target",
37893808
"smallvec",
3809+
"thin-vec",
37903810
"tracing",
37913811
]
37923812

@@ -3798,7 +3818,7 @@ dependencies = [
37983818
"rustc_abi",
37993819
"rustc_arena",
38003820
"rustc_ast",
3801-
"rustc_attr",
3821+
"rustc_attr_parsing",
38023822
"rustc_data_structures",
38033823
"rustc_errors",
38043824
"rustc_feature",
@@ -3837,7 +3857,7 @@ dependencies = [
38373857
"rustc_abi",
38383858
"rustc_ast",
38393859
"rustc_ast_ir",
3840-
"rustc_attr",
3860+
"rustc_attr_parsing",
38413861
"rustc_data_structures",
38423862
"rustc_errors",
38433863
"rustc_fluent_macro",
@@ -3926,7 +3946,7 @@ dependencies = [
39263946
"rustc_ast_lowering",
39273947
"rustc_ast_passes",
39283948
"rustc_ast_pretty",
3929-
"rustc_attr",
3949+
"rustc_attr_parsing",
39303950
"rustc_borrowck",
39313951
"rustc_builtin_macros",
39323952
"rustc_codegen_llvm",
@@ -3982,7 +4002,7 @@ dependencies = [
39824002
"rustc_abi",
39834003
"rustc_ast",
39844004
"rustc_ast_pretty",
3985-
"rustc_attr",
4005+
"rustc_attr_parsing",
39864006
"rustc_data_structures",
39874007
"rustc_errors",
39884008
"rustc_feature",
@@ -4056,7 +4076,7 @@ dependencies = [
40564076
"odht",
40574077
"rustc_abi",
40584078
"rustc_ast",
4059-
"rustc_attr",
4079+
"rustc_attr_parsing",
40604080
"rustc_data_structures",
40614081
"rustc_errors",
40624082
"rustc_expand",
@@ -4093,7 +4113,7 @@ dependencies = [
40934113
"rustc_arena",
40944114
"rustc_ast",
40954115
"rustc_ast_ir",
4096-
"rustc_attr",
4116+
"rustc_attr_parsing",
40974117
"rustc_data_structures",
40984118
"rustc_error_messages",
40994119
"rustc_errors",
@@ -4172,7 +4192,7 @@ dependencies = [
41724192
"rustc_abi",
41734193
"rustc_arena",
41744194
"rustc_ast",
4175-
"rustc_attr",
4195+
"rustc_attr_parsing",
41764196
"rustc_const_eval",
41774197
"rustc_data_structures",
41784198
"rustc_errors",
@@ -4198,7 +4218,7 @@ name = "rustc_monomorphize"
41984218
version = "0.0.0"
41994219
dependencies = [
42004220
"rustc_abi",
4201-
"rustc_attr",
4221+
"rustc_attr_parsing",
42024222
"rustc_data_structures",
42034223
"rustc_errors",
42044224
"rustc_fluent_macro",
@@ -4266,15 +4286,14 @@ dependencies = [
42664286
"rustc_abi",
42674287
"rustc_ast",
42684288
"rustc_ast_pretty",
4269-
"rustc_attr",
4289+
"rustc_attr_parsing",
42704290
"rustc_data_structures",
42714291
"rustc_errors",
42724292
"rustc_expand",
42734293
"rustc_feature",
42744294
"rustc_fluent_macro",
42754295
"rustc_hir",
42764296
"rustc_index",
4277-
"rustc_lexer",
42784297
"rustc_macros",
42794298
"rustc_middle",
42804299
"rustc_privacy",
@@ -4313,7 +4332,7 @@ name = "rustc_privacy"
43134332
version = "0.0.0"
43144333
dependencies = [
43154334
"rustc_ast",
4316-
"rustc_attr",
4335+
"rustc_attr_parsing",
43174336
"rustc_data_structures",
43184337
"rustc_errors",
43194338
"rustc_fluent_macro",
@@ -4377,7 +4396,7 @@ dependencies = [
43774396
"rustc_arena",
43784397
"rustc_ast",
43794398
"rustc_ast_pretty",
4380-
"rustc_attr",
4399+
"rustc_attr_parsing",
43814400
"rustc_data_structures",
43824401
"rustc_errors",
43834402
"rustc_expand",
@@ -4455,9 +4474,9 @@ version = "0.0.0"
44554474
dependencies = [
44564475
"rustc_abi",
44574476
"rustc_ast",
4458-
"rustc_ast_pretty",
44594477
"rustc_data_structures",
44604478
"rustc_hir",
4479+
"rustc_hir_pretty",
44614480
"rustc_middle",
44624481
"rustc_session",
44634482
"rustc_span",
@@ -4534,7 +4553,7 @@ dependencies = [
45344553
"rustc_abi",
45354554
"rustc_ast",
45364555
"rustc_ast_ir",
4537-
"rustc_attr",
4556+
"rustc_attr_parsing",
45384557
"rustc_data_structures",
45394558
"rustc_errors",
45404559
"rustc_fluent_macro",

compiler/rustc_abi/src/callconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
206206
let (mut result, mut total) = from_fields_at(*self, Size::ZERO)?;
207207

208208
match &self.variants {
209-
abi::Variants::Single { .. } => {}
209+
abi::Variants::Single { .. } | abi::Variants::Empty => {}
210210
abi::Variants::Multiple { variants, .. } => {
211211
// Treat enum variants like union members.
212212
// HACK(eddyb) pretend the `enum` field (discriminant)

compiler/rustc_abi/src/extern_abi/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use std::fmt;
22

33
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
4-
use rustc_span::symbol::sym;
5-
use rustc_span::{Span, Symbol};
4+
use rustc_span::{Span, Symbol, sym};
65

76
#[cfg(test)]
87
mod tests;

compiler/rustc_abi/src/layout.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
213213
&self,
214214
) -> LayoutData<FieldIdx, VariantIdx> {
215215
let dl = self.cx.data_layout();
216+
// This is also used for uninhabited enums, so we use `Variants::Empty`.
216217
LayoutData {
217-
variants: Variants::Single { index: VariantIdx::new(0) },
218+
variants: Variants::Empty,
218219
fields: FieldsShape::Primitive,
219220
backend_repr: BackendRepr::Uninhabited,
220221
largest_niche: None,
@@ -1004,8 +1005,8 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
10041005
Variants::Multiple { tag, tag_encoding, tag_field, .. } => {
10051006
Variants::Multiple { tag, tag_encoding, tag_field, variants: best_layout.variants }
10061007
}
1007-
Variants::Single { .. } => {
1008-
panic!("encountered a single-variant enum during multi-variant layout")
1008+
Variants::Single { .. } | Variants::Empty => {
1009+
panic!("encountered a single-variant or empty enum during multi-variant layout")
10091010
}
10101011
};
10111012
Ok(best_layout.layout)

compiler/rustc_abi/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,10 +1504,12 @@ impl BackendRepr {
15041504
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
15051505
#[cfg_attr(feature = "nightly", derive(HashStable_Generic))]
15061506
pub enum Variants<FieldIdx: Idx, VariantIdx: Idx> {
1507+
/// A type with no valid variants. Must be uninhabited.
1508+
Empty,
1509+
15071510
/// Single enum variants, structs/tuples, unions, and all non-ADTs.
15081511
Single {
1509-
/// Always 0 for non-enums/generators.
1510-
/// For enums without a variant, this is an invalid index!
1512+
/// Always `0` for types that cannot have multiple variants.
15111513
index: VariantIdx,
15121514
},
15131515

0 commit comments

Comments
 (0)