Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c272bb4

Browse files
authored
Merge pull request rust-lang#4019 from rust-lang/rustup-2024-11-09
Automatic Rustup
2 parents d7aceee + 15d883e commit c272bb4

File tree

1,352 files changed

+19121
-8906
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,352 files changed

+19121
-8906
lines changed

.github/ISSUE_TEMPLATE/tracking_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for larger features an implementation could be broken up into multiple PRs.
4646

4747
[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
4848
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs
49-
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md
49+
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/main/nightly-style-procedure.md
5050
[Style Guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide
5151

5252
### Unresolved Questions

.github/workflows/ci.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ jobs:
110110
# less disk space.
111111
- name: free up disk space
112112
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
113-
if: contains(matrix.os, 'ubuntu')
114-
with:
115-
# Removing packages with APT saves ~5 GiB, but takes several
116-
# minutes (and potentially removes important packages).
117-
large-packages: false
113+
if: matrix.free_disk
118114

119115
# Rust Log Analyzer can't currently detect the PR number of a GitHub
120116
# Actions build on its own, so a hint in the log message is needed to

Cargo.lock

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,7 +2861,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
28612861
checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"
28622862
dependencies = [
28632863
"bitflags 2.6.0",
2864-
"getopts",
28652864
"memchr",
28662865
"pulldown-cmark-escape 0.11.0",
28672866
"unicase",
@@ -3196,6 +3195,18 @@ version = "0.1.0"
31963195
source = "registry+https://github.com/rust-lang/crates.io-index"
31973196
checksum = "e5c9f15eec8235d7cb775ee6f81891db79b98fd54ba1ad8fae565b88ef1ae4e2"
31983197

3198+
[[package]]
3199+
name = "rustc-std-workspace-alloc"
3200+
version = "1.0.1"
3201+
3202+
[[package]]
3203+
name = "rustc-std-workspace-core"
3204+
version = "1.0.1"
3205+
3206+
[[package]]
3207+
name = "rustc-std-workspace-std"
3208+
version = "1.0.1"
3209+
31993210
[[package]]
32003211
name = "rustc_abi"
32013212
version = "0.0.0"
@@ -3262,7 +3273,6 @@ name = "rustc_ast_lowering"
32623273
version = "0.0.0"
32633274
dependencies = [
32643275
"rustc_ast",
3265-
"rustc_ast_pretty",
32663276
"rustc_data_structures",
32673277
"rustc_errors",
32683278
"rustc_fluent_macro",
@@ -3346,6 +3356,7 @@ dependencies = [
33463356
"either",
33473357
"itertools",
33483358
"polonius-engine",
3359+
"rustc_abi",
33493360
"rustc_data_structures",
33503361
"rustc_errors",
33513362
"rustc_fluent_macro",
@@ -3359,7 +3370,6 @@ dependencies = [
33593370
"rustc_mir_dataflow",
33603371
"rustc_session",
33613372
"rustc_span",
3362-
"rustc_target",
33633373
"rustc_trait_selection",
33643374
"rustc_traits",
33653375
"smallvec",
@@ -3457,7 +3467,6 @@ dependencies = [
34573467
"rustc_macros",
34583468
"rustc_metadata",
34593469
"rustc_middle",
3460-
"rustc_monomorphize",
34613470
"rustc_query_system",
34623471
"rustc_serialize",
34633472
"rustc_session",
@@ -3706,6 +3715,7 @@ name = "rustc_hir"
37063715
version = "0.0.0"
37073716
dependencies = [
37083717
"odht",
3718+
"rustc_abi",
37093719
"rustc_arena",
37103720
"rustc_ast",
37113721
"rustc_data_structures",
@@ -3732,7 +3742,6 @@ dependencies = [
37323742
"rustc_feature",
37333743
"rustc_fluent_macro",
37343744
"rustc_hir",
3735-
"rustc_hir_pretty",
37363745
"rustc_index",
37373746
"rustc_infer",
37383747
"rustc_lint_defs",
@@ -3780,7 +3789,6 @@ dependencies = [
37803789
"rustc_middle",
37813790
"rustc_session",
37823791
"rustc_span",
3783-
"rustc_target",
37843792
"rustc_trait_selection",
37853793
"rustc_type_ir",
37863794
"smallvec",
@@ -3840,9 +3848,7 @@ dependencies = [
38403848
"rustc_index",
38413849
"rustc_macros",
38423850
"rustc_middle",
3843-
"rustc_next_trait_solver",
38443851
"rustc_span",
3845-
"rustc_target",
38463852
"rustc_type_ir",
38473853
"smallvec",
38483854
"thin-vec",
@@ -3921,7 +3927,6 @@ dependencies = [
39213927
"rustc_feature",
39223928
"rustc_fluent_macro",
39233929
"rustc_hir",
3924-
"rustc_hir_pretty",
39253930
"rustc_index",
39263931
"rustc_infer",
39273932
"rustc_macros",
@@ -4092,7 +4097,6 @@ dependencies = [
40924097
"rustc_macros",
40934098
"rustc_middle",
40944099
"rustc_span",
4095-
"rustc_target",
40964100
"smallvec",
40974101
"tracing",
40984102
]
@@ -4131,6 +4135,7 @@ dependencies = [
41314135
name = "rustc_monomorphize"
41324136
version = "0.0.0"
41334137
dependencies = [
4138+
"rustc_abi",
41344139
"rustc_data_structures",
41354140
"rustc_errors",
41364141
"rustc_fluent_macro",
@@ -4149,7 +4154,6 @@ dependencies = [
41494154
name = "rustc_next_trait_solver"
41504155
version = "0.0.0"
41514156
dependencies = [
4152-
"bitflags 2.6.0",
41534157
"derive-where",
41544158
"rustc_ast_ir",
41554159
"rustc_data_structures",
@@ -4235,7 +4239,6 @@ dependencies = [
42354239
"rustc_middle",
42364240
"rustc_session",
42374241
"rustc_span",
4238-
"rustc_target",
42394242
"smallvec",
42404243
"tracing",
42414244
"tracing-subscriber",
@@ -4335,6 +4338,7 @@ name = "rustc_sanitizers"
43354338
version = "0.0.0"
43364339
dependencies = [
43374340
"bitflags 2.6.0",
4341+
"rustc_abi",
43384342
"rustc_data_structures",
43394343
"rustc_hir",
43404344
"rustc_middle",
@@ -4434,7 +4438,6 @@ dependencies = [
44344438
"rustc_middle",
44354439
"rustc_session",
44364440
"rustc_span",
4437-
"rustc_target",
44384441
"tracing",
44394442
]
44404443

@@ -4446,9 +4449,7 @@ dependencies = [
44464449
"object 0.36.4",
44474450
"rustc_abi",
44484451
"rustc_data_structures",
4449-
"rustc_feature",
44504452
"rustc_fs_util",
4451-
"rustc_index",
44524453
"rustc_macros",
44534454
"rustc_serialize",
44544455
"rustc_span",
@@ -4467,6 +4468,7 @@ name = "rustc_trait_selection"
44674468
version = "0.0.0"
44684469
dependencies = [
44694470
"itertools",
4471+
"rustc_abi",
44704472
"rustc_ast",
44714473
"rustc_ast_ir",
44724474
"rustc_attr",
@@ -4479,11 +4481,8 @@ dependencies = [
44794481
"rustc_middle",
44804482
"rustc_next_trait_solver",
44814483
"rustc_parse_format",
4482-
"rustc_query_system",
4483-
"rustc_serialize",
44844484
"rustc_session",
44854485
"rustc_span",
4486-
"rustc_target",
44874486
"rustc_transmute",
44884487
"rustc_type_ir",
44894488
"smallvec",

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ resolver = "2"
33
members = [
44
"compiler/rustc",
55
"src/etc/test-float-parse",
6+
"src/rustc-std-workspace/rustc-std-workspace-core",
7+
"src/rustc-std-workspace/rustc-std-workspace-alloc",
8+
"src/rustc-std-workspace/rustc-std-workspace-std",
69
"src/rustdoc-json-types",
710
"src/tools/build_helper",
811
"src/tools/cargotest",

compiler/rustc/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// We need this feature as it changes `dylib` linking behavior and allows us to link to `rustc_driver`.
22
#![feature(rustc_private)]
3+
// Several crates are depended upon but unused so that they are present in the sysroot
4+
#![expect(unused_crate_dependencies)]
35

46
// A note about jemalloc: rustc uses jemalloc when built for CI and
57
// distribution. The obvious way to do this is with the `#[global_allocator]`

compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ pub struct WhereClause {
414414
pub span: Span,
415415
}
416416

417+
impl WhereClause {
418+
pub fn is_empty(&self) -> bool {
419+
!self.has_where_token && self.predicates.is_empty()
420+
}
421+
}
422+
417423
impl Default for WhereClause {
418424
fn default() -> WhereClause {
419425
WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP }

compiler/rustc_ast/src/attr/mod.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,35 @@ impl Attribute {
136136
}
137137
}
138138

139+
/// Returns a list of meta items if the attribute is delimited with parenthesis:
140+
///
141+
/// ```text
142+
/// #[attr(a, b = "c")] // Returns `Some()`.
143+
/// #[attr = ""] // Returns `None`.
144+
/// #[attr] // Returns `None`.
145+
/// ```
139146
pub fn meta_item_list(&self) -> Option<ThinVec<MetaItemInner>> {
140147
match &self.kind {
141148
AttrKind::Normal(normal) => normal.item.meta_item_list(),
142149
AttrKind::DocComment(..) => None,
143150
}
144151
}
145152

153+
/// Returns the string value in:
154+
///
155+
/// ```text
156+
/// #[attribute = "value"]
157+
/// ^^^^^^^
158+
/// ```
159+
///
160+
/// It returns `None` in any other cases, including doc comments if they
161+
/// are not under the form `#[doc = "..."]`.
162+
///
163+
/// It also returns `None` for:
164+
///
165+
/// ```text
166+
/// #[attr("value")]
167+
/// ```
146168
pub fn value_str(&self) -> Option<Symbol> {
147169
match &self.kind {
148170
AttrKind::Normal(normal) => normal.item.value_str(),
@@ -232,6 +254,18 @@ impl AttrItem {
232254
}
233255
}
234256

257+
/// Returns the string value in:
258+
///
259+
/// ```text
260+
/// #[attribute = "value"]
261+
/// ^^^^^^^
262+
/// ```
263+
///
264+
/// It returns `None` in any other cases like:
265+
///
266+
/// ```text
267+
/// #[attr("value")]
268+
/// ```
235269
fn value_str(&self) -> Option<Symbol> {
236270
match &self.args {
237271
AttrArgs::Eq(_, args) => args.value_str(),
@@ -315,6 +349,18 @@ impl MetaItem {
315349
Some(self.name_value_literal()?.span)
316350
}
317351

352+
/// Returns the string value in:
353+
///
354+
/// ```text
355+
/// #[attribute = "value"]
356+
/// ^^^^^^^
357+
/// ```
358+
///
359+
/// It returns `None` in any other cases like:
360+
///
361+
/// ```text
362+
/// #[attr("value")]
363+
/// ```
318364
pub fn value_str(&self) -> Option<Symbol> {
319365
match &self.kind {
320366
MetaItemKind::NameValue(v) => v.kind.str(),

compiler/rustc_ast_lowering/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ doctest = false
99
[dependencies]
1010
# tidy-alphabetical-start
1111
rustc_ast = { path = "../rustc_ast" }
12-
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
1312
rustc_data_structures = { path = "../rustc_data_structures" }
1413
rustc_errors = { path = "../rustc_errors" }
1514
rustc_fluent_macro = { path = "../rustc_fluent_macro" }

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ pub(crate) struct ConstBoundTraitObject {
594594
pub span: Span,
595595
}
596596

597-
// FIXME(effects): Consider making the note/reason the message of the diagnostic.
598-
// FIXME(effects): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here).
597+
// FIXME(const_trait_impl): Consider making the note/reason the message of the diagnostic.
598+
// FIXME(const_trait_impl): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here).
599599
#[derive(Diagnostic)]
600600
#[diag(ast_passes_tilde_const_disallowed)]
601601
pub(crate) struct TildeConstDisallowed {

compiler/rustc_attr/src/builtin.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ pub fn find_stability(
273273
/// Collects stability info from `rustc_const_stable`/`rustc_const_unstable`/`rustc_promotable`
274274
/// attributes in `attrs`. Returns `None` if no stability attributes are found.
275275
///
276-
/// `is_const_fn` indicates whether this is a function marked as `const`. It will always
277-
/// be false for intrinsics in an `extern` block!
276+
/// `is_const_fn` indicates whether this is a function marked as `const`.
278277
pub fn find_const_stability(
279278
sess: &Session,
280279
attrs: &[Attribute],
@@ -330,7 +329,7 @@ pub fn find_const_stability(
330329
}
331330
}
332331

333-
// Merge promotable and not_exposed_on_stable into stability info
332+
// Merge promotable and const_stable_indirect into stability info
334333
if promotable {
335334
match &mut const_stab {
336335
Some((stab, _)) => stab.promotable = promotable,
@@ -352,10 +351,7 @@ pub fn find_const_stability(
352351
})
353352
}
354353
}
355-
_ => {
356-
// We ignore the `#[rustc_const_stable_indirect]` here, it should be picked up by
357-
// the `default_const_unstable` logic.
358-
}
354+
_ => {}
359355
}
360356
}
361357
// Make sure if `const_stable_indirect` is present, that is recorded. Also make sure all `const

compiler/rustc_borrowck/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ edition = "2021"
88
either = "1.5.0"
99
itertools = "0.12"
1010
polonius-engine = "0.13.0"
11+
rustc_abi = { path = "../rustc_abi" }
1112
rustc_data_structures = { path = "../rustc_data_structures" }
1213
rustc_errors = { path = "../rustc_errors" }
1314
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
@@ -21,7 +22,6 @@ rustc_middle = { path = "../rustc_middle" }
2122
rustc_mir_dataflow = { path = "../rustc_mir_dataflow" }
2223
rustc_session = { path = "../rustc_session" }
2324
rustc_span = { path = "../rustc_span" }
24-
rustc_target = { path = "../rustc_target" }
2525
rustc_trait_selection = { path = "../rustc_trait_selection" }
2626
rustc_traits = { path = "../rustc_traits" }
2727
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }

0 commit comments

Comments
 (0)