Skip to content

Commit 955ef09

Browse files
authored
Merge pull request #4097 from rust-lang/rustup-2024-12-18
Automatic Rustup
2 parents e999c48 + d49845e commit 955ef09

File tree

923 files changed

+22150
-8900
lines changed

Some content is hidden

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

923 files changed

+22150
-8900
lines changed

.github/workflows/ci.yml

+3-2
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

+42-22
Original file line numberDiff line numberDiff line change
@@ -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",
@@ -3515,12 +3534,13 @@ dependencies = [
35153534
"rustc_arena",
35163535
"rustc_ast",
35173536
"rustc_ast_pretty",
3518-
"rustc_attr",
3537+
"rustc_attr_parsing",
35193538
"rustc_data_structures",
35203539
"rustc_errors",
35213540
"rustc_fluent_macro",
35223541
"rustc_fs_util",
35233542
"rustc_hir",
3543+
"rustc_hir_pretty",
35243544
"rustc_incremental",
35253545
"rustc_index",
35263546
"rustc_macros",
@@ -3552,7 +3572,7 @@ dependencies = [
35523572
"rustc_abi",
35533573
"rustc_apfloat",
35543574
"rustc_ast",
3555-
"rustc_attr",
3575+
"rustc_attr_parsing",
35563576
"rustc_data_structures",
35573577
"rustc_errors",
35583578
"rustc_fluent_macro",
@@ -3619,7 +3639,7 @@ dependencies = [
36193639
"rustc_ast_lowering",
36203640
"rustc_ast_passes",
36213641
"rustc_ast_pretty",
3622-
"rustc_attr",
3642+
"rustc_attr_parsing",
36233643
"rustc_borrowck",
36243644
"rustc_builtin_macros",
36253645
"rustc_codegen_ssa",
@@ -3723,7 +3743,7 @@ dependencies = [
37233743
"rustc_ast",
37243744
"rustc_ast_passes",
37253745
"rustc_ast_pretty",
3726-
"rustc_attr",
3746+
"rustc_attr_parsing",
37273747
"rustc_data_structures",
37283748
"rustc_errors",
37293749
"rustc_feature",
@@ -3786,6 +3806,7 @@ dependencies = [
37863806
"rustc_span",
37873807
"rustc_target",
37883808
"smallvec",
3809+
"thin-vec",
37893810
"tracing",
37903811
]
37913812

@@ -3797,7 +3818,7 @@ dependencies = [
37973818
"rustc_abi",
37983819
"rustc_arena",
37993820
"rustc_ast",
3800-
"rustc_attr",
3821+
"rustc_attr_parsing",
38013822
"rustc_data_structures",
38023823
"rustc_errors",
38033824
"rustc_feature",
@@ -3836,7 +3857,7 @@ dependencies = [
38363857
"rustc_abi",
38373858
"rustc_ast",
38383859
"rustc_ast_ir",
3839-
"rustc_attr",
3860+
"rustc_attr_parsing",
38403861
"rustc_data_structures",
38413862
"rustc_errors",
38423863
"rustc_fluent_macro",
@@ -3925,7 +3946,7 @@ dependencies = [
39253946
"rustc_ast_lowering",
39263947
"rustc_ast_passes",
39273948
"rustc_ast_pretty",
3928-
"rustc_attr",
3949+
"rustc_attr_parsing",
39293950
"rustc_borrowck",
39303951
"rustc_builtin_macros",
39313952
"rustc_codegen_llvm",
@@ -3981,7 +4002,7 @@ dependencies = [
39814002
"rustc_abi",
39824003
"rustc_ast",
39834004
"rustc_ast_pretty",
3984-
"rustc_attr",
4005+
"rustc_attr_parsing",
39854006
"rustc_data_structures",
39864007
"rustc_errors",
39874008
"rustc_feature",
@@ -4055,7 +4076,7 @@ dependencies = [
40554076
"odht",
40564077
"rustc_abi",
40574078
"rustc_ast",
4058-
"rustc_attr",
4079+
"rustc_attr_parsing",
40594080
"rustc_data_structures",
40604081
"rustc_errors",
40614082
"rustc_expand",
@@ -4092,7 +4113,7 @@ dependencies = [
40924113
"rustc_arena",
40934114
"rustc_ast",
40944115
"rustc_ast_ir",
4095-
"rustc_attr",
4116+
"rustc_attr_parsing",
40964117
"rustc_data_structures",
40974118
"rustc_error_messages",
40984119
"rustc_errors",
@@ -4171,7 +4192,7 @@ dependencies = [
41714192
"rustc_abi",
41724193
"rustc_arena",
41734194
"rustc_ast",
4174-
"rustc_attr",
4195+
"rustc_attr_parsing",
41754196
"rustc_const_eval",
41764197
"rustc_data_structures",
41774198
"rustc_errors",
@@ -4197,7 +4218,7 @@ name = "rustc_monomorphize"
41974218
version = "0.0.0"
41984219
dependencies = [
41994220
"rustc_abi",
4200-
"rustc_attr",
4221+
"rustc_attr_parsing",
42014222
"rustc_data_structures",
42024223
"rustc_errors",
42034224
"rustc_fluent_macro",
@@ -4265,15 +4286,14 @@ dependencies = [
42654286
"rustc_abi",
42664287
"rustc_ast",
42674288
"rustc_ast_pretty",
4268-
"rustc_attr",
4289+
"rustc_attr_parsing",
42694290
"rustc_data_structures",
42704291
"rustc_errors",
42714292
"rustc_expand",
42724293
"rustc_feature",
42734294
"rustc_fluent_macro",
42744295
"rustc_hir",
42754296
"rustc_index",
4276-
"rustc_lexer",
42774297
"rustc_macros",
42784298
"rustc_middle",
42794299
"rustc_privacy",
@@ -4312,7 +4332,7 @@ name = "rustc_privacy"
43124332
version = "0.0.0"
43134333
dependencies = [
43144334
"rustc_ast",
4315-
"rustc_attr",
4335+
"rustc_attr_parsing",
43164336
"rustc_data_structures",
43174337
"rustc_errors",
43184338
"rustc_fluent_macro",
@@ -4376,7 +4396,7 @@ dependencies = [
43764396
"rustc_arena",
43774397
"rustc_ast",
43784398
"rustc_ast_pretty",
4379-
"rustc_attr",
4399+
"rustc_attr_parsing",
43804400
"rustc_data_structures",
43814401
"rustc_errors",
43824402
"rustc_expand",
@@ -4454,9 +4474,9 @@ version = "0.0.0"
44544474
dependencies = [
44554475
"rustc_abi",
44564476
"rustc_ast",
4457-
"rustc_ast_pretty",
44584477
"rustc_data_structures",
44594478
"rustc_hir",
4479+
"rustc_hir_pretty",
44604480
"rustc_middle",
44614481
"rustc_session",
44624482
"rustc_span",
@@ -4533,7 +4553,7 @@ dependencies = [
45334553
"rustc_abi",
45344554
"rustc_ast",
45354555
"rustc_ast_ir",
4536-
"rustc_attr",
4556+
"rustc_attr_parsing",
45374557
"rustc_data_structures",
45384558
"rustc_errors",
45394559
"rustc_fluent_macro",

compiler/rustc_abi/src/extern_abi/mod.rs

+1-2
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_ast/src/ast.rs

+8-64
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! - [`UnOp`], [`BinOp`], and [`BinOpKind`]: Unary and binary operators.
2020
2121
use std::borrow::Cow;
22-
use std::{cmp, fmt, mem};
22+
use std::{cmp, fmt};
2323

2424
pub use GenericArgs::*;
2525
pub use UnsafeSource::*;
@@ -31,8 +31,7 @@ use rustc_data_structures::sync::Lrc;
3131
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
3232
pub use rustc_span::AttrId;
3333
use rustc_span::source_map::{Spanned, respan};
34-
use rustc_span::symbol::{Ident, Symbol, kw, sym};
35-
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span};
34+
use rustc_span::{DUMMY_SP, ErrorGuaranteed, Ident, Span, Symbol, kw, sym};
3635
use thin_vec::{ThinVec, thin_vec};
3736

3837
pub use crate::format::*;
@@ -859,6 +858,8 @@ pub enum PatKind {
859858
pub enum PatFieldsRest {
860859
/// `module::StructName { field, ..}`
861860
Rest,
861+
/// `module::StructName { field, syntax error }`
862+
Recovered(ErrorGuaranteed),
862863
/// `module::StructName { field }`
863864
None,
864865
}
@@ -1758,53 +1759,16 @@ pub enum AttrArgs {
17581759
Eq {
17591760
/// Span of the `=` token.
17601761
eq_span: Span,
1761-
1762-
value: AttrArgsEq,
1762+
expr: P<Expr>,
17631763
},
17641764
}
17651765

1766-
// The RHS of an `AttrArgs::Eq` starts out as an expression. Once macro
1767-
// expansion is completed, all cases end up either as a meta item literal,
1768-
// which is the form used after lowering to HIR, or as an error.
1769-
#[derive(Clone, Encodable, Decodable, Debug)]
1770-
pub enum AttrArgsEq {
1771-
Ast(P<Expr>),
1772-
Hir(MetaItemLit),
1773-
}
1774-
1775-
impl AttrArgsEq {
1776-
pub fn span(&self) -> Span {
1777-
match self {
1778-
AttrArgsEq::Ast(p) => p.span,
1779-
AttrArgsEq::Hir(lit) => lit.span,
1780-
}
1781-
}
1782-
1783-
pub fn unwrap_ast(&self) -> &Expr {
1784-
match self {
1785-
AttrArgsEq::Ast(p) => p,
1786-
AttrArgsEq::Hir(lit) => {
1787-
unreachable!("in literal form when getting inner tokens: {lit:?}")
1788-
}
1789-
}
1790-
}
1791-
1792-
pub fn unwrap_ast_mut(&mut self) -> &mut P<Expr> {
1793-
match self {
1794-
AttrArgsEq::Ast(p) => p,
1795-
AttrArgsEq::Hir(lit) => {
1796-
unreachable!("in literal form when getting inner tokens: {lit:?}")
1797-
}
1798-
}
1799-
}
1800-
}
1801-
18021766
impl AttrArgs {
18031767
pub fn span(&self) -> Option<Span> {
18041768
match self {
18051769
AttrArgs::Empty => None,
18061770
AttrArgs::Delimited(args) => Some(args.dspan.entire()),
1807-
AttrArgs::Eq { eq_span, value } => Some(eq_span.to(value.span())),
1771+
AttrArgs::Eq { eq_span, expr } => Some(eq_span.to(expr.span)),
18081772
}
18091773
}
18101774

@@ -1814,27 +1778,7 @@ impl AttrArgs {
18141778
match self {
18151779
AttrArgs::Empty => TokenStream::default(),
18161780
AttrArgs::Delimited(args) => args.tokens.clone(),
1817-
AttrArgs::Eq { value, .. } => TokenStream::from_ast(value.unwrap_ast()),
1818-
}
1819-
}
1820-
}
1821-
1822-
impl<CTX> HashStable<CTX> for AttrArgs
1823-
where
1824-
CTX: crate::HashStableContext,
1825-
{
1826-
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
1827-
mem::discriminant(self).hash_stable(ctx, hasher);
1828-
match self {
1829-
AttrArgs::Empty => {}
1830-
AttrArgs::Delimited(args) => args.hash_stable(ctx, hasher),
1831-
AttrArgs::Eq { value: AttrArgsEq::Ast(expr), .. } => {
1832-
unreachable!("hash_stable {:?}", expr);
1833-
}
1834-
AttrArgs::Eq { eq_span, value: AttrArgsEq::Hir(lit) } => {
1835-
eq_span.hash_stable(ctx, hasher);
1836-
lit.hash_stable(ctx, hasher);
1837-
}
1781+
AttrArgs::Eq { expr, .. } => TokenStream::from_ast(expr),
18381782
}
18391783
}
18401784
}
@@ -3051,7 +2995,7 @@ impl NormalAttr {
30512995
}
30522996
}
30532997

3054-
#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
2998+
#[derive(Clone, Encodable, Decodable, Debug)]
30552999
pub struct AttrItem {
30563000
pub unsafety: Safety,
30573001
pub path: Path,

0 commit comments

Comments
 (0)