Skip to content

Commit 45a9a7c

Browse files
committed
Auto merge of rust-lang#3980 - rust-lang:rustup-2024-10-20, r=RalfJung
Automatic Rustup
2 parents 3386ae2 + ccd680e commit 45a9a7c

File tree

675 files changed

+10404
-4840
lines changed

Some content is hidden

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

675 files changed

+10404
-4840
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ jobs:
104104
with:
105105
fetch-depth: 2
106106

107+
# Free up disk space on Linux by removing preinstalled components that
108+
# we do not need. We do this to enable some of the less resource
109+
# intensive jobs to run on free runners, which however also have
110+
# less disk space.
111+
- name: free up disk space
112+
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
118+
107119
# Rust Log Analyzer can't currently detect the PR number of a GitHub
108120
# Actions build on its own, so a hint in the log message is needed to
109121
# point it in the right direction.
@@ -194,6 +206,11 @@ jobs:
194206
- name: create github artifacts
195207
run: src/ci/scripts/create-doc-artifacts.sh
196208

209+
- name: print disk usage
210+
run: |
211+
echo "disk usage:"
212+
df -h
213+
197214
- name: upload artifacts to github
198215
uses: actions/upload-artifact@v4
199216
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ build/
5757
/src/tools/x/target
5858
# Created by default with `src/ci/docker/run.sh`
5959
/obj/
60+
# Created by nix dev shell / .envrc
61+
src/tools/nix-dev-shell/flake.lock
6062

6163
## ICE reports
6264
rustc-ice-*.txt

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com>
256256
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub.bukaj@yahoo.com>
257257
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub@jakub.cc>
258258
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakubw@jakubw.net>
259+
Jakub Beránek <berykubik@gmail.com> <jakub.beranek@vsb.cz>
259260
James [Undefined] <tpzker@thepuzzlemaker.info>
260261
James Deng <cnjamesdeng@gmail.com> <cnJamesDeng@gmail.com>
261262
James Hinshelwood <jameshinshelwood1@gmail.com> <james.hinshelwood@bigpayme.com>

Cargo.lock

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ dependencies = [
377377
"cargo_metadata",
378378
"directories",
379379
"rustc-build-sysroot",
380-
"rustc_tools_util 0.4.0",
380+
"rustc_tools_util",
381381
"rustc_version",
382382
"serde",
383383
"serde_json",
@@ -537,7 +537,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
537537

538538
[[package]]
539539
name = "clippy"
540-
version = "0.1.83"
540+
version = "0.1.84"
541541
dependencies = [
542542
"anstream",
543543
"cargo_metadata",
@@ -550,9 +550,11 @@ dependencies = [
550550
"if_chain",
551551
"itertools",
552552
"parking_lot",
553+
"pulldown-cmark 0.11.3",
553554
"quote",
554555
"regex",
555-
"rustc_tools_util 0.3.0",
556+
"rinja",
557+
"rustc_tools_util",
556558
"serde",
557559
"serde_json",
558560
"syn 2.0.79",
@@ -566,7 +568,7 @@ dependencies = [
566568

567569
[[package]]
568570
name = "clippy_config"
569-
version = "0.1.83"
571+
version = "0.1.84"
570572
dependencies = [
571573
"itertools",
572574
"serde",
@@ -582,20 +584,19 @@ dependencies = [
582584
"clap",
583585
"indoc",
584586
"itertools",
585-
"opener 0.6.1",
587+
"opener",
586588
"shell-escape",
587589
"walkdir",
588590
]
589591

590592
[[package]]
591593
name = "clippy_lints"
592-
version = "0.1.83"
594+
version = "0.1.84"
593595
dependencies = [
594596
"arrayvec",
595597
"cargo_metadata",
596598
"clippy_config",
597599
"clippy_utils",
598-
"declare_clippy_lint",
599600
"itertools",
600601
"quine-mc_cluskey",
601602
"regex",
@@ -613,7 +614,7 @@ dependencies = [
613614

614615
[[package]]
615616
name = "clippy_utils"
616-
version = "0.1.83"
617+
version = "0.1.84"
617618
dependencies = [
618619
"arrayvec",
619620
"clippy_config",
@@ -919,15 +920,6 @@ dependencies = [
919920
"winapi",
920921
]
921922

922-
[[package]]
923-
name = "declare_clippy_lint"
924-
version = "0.1.83"
925-
dependencies = [
926-
"itertools",
927-
"quote",
928-
"syn 2.0.79",
929-
]
930-
931923
[[package]]
932924
name = "deranged"
933925
version = "0.3.11"
@@ -2163,7 +2155,7 @@ dependencies = [
21632155
"log",
21642156
"memchr",
21652157
"once_cell",
2166-
"opener 0.7.2",
2158+
"opener",
21672159
"pulldown-cmark 0.10.3",
21682160
"regex",
21692161
"serde",
@@ -2501,17 +2493,6 @@ dependencies = [
25012493
"stable_deref_trait",
25022494
]
25032495

2504-
[[package]]
2505-
name = "opener"
2506-
version = "0.6.1"
2507-
source = "registry+https://github.com/rust-lang/crates.io-index"
2508-
checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788"
2509-
dependencies = [
2510-
"bstr",
2511-
"normpath",
2512-
"winapi",
2513-
]
2514-
25152496
[[package]]
25162497
name = "opener"
25172498
version = "0.7.2"
@@ -2879,6 +2860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
28792860
checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"
28802861
dependencies = [
28812862
"bitflags 2.6.0",
2863+
"getopts",
28822864
"memchr",
28832865
"pulldown-cmark-escape 0.11.0",
28842866
"unicase",
@@ -4460,12 +4442,6 @@ dependencies = [
44604442
"tracing",
44614443
]
44624444

4463-
[[package]]
4464-
name = "rustc_tools_util"
4465-
version = "0.3.0"
4466-
source = "registry+https://github.com/rust-lang/crates.io-index"
4467-
checksum = "8ba09476327c4b70ccefb6180f046ef588c26a24cf5d269a9feba316eb4f029f"
4468-
44694445
[[package]]
44704446
name = "rustc_tools_util"
44714447
version = "0.4.0"
@@ -4608,6 +4584,7 @@ dependencies = [
46084584
"rustdoc-json-types",
46094585
"serde",
46104586
"serde_json",
4587+
"sha2",
46114588
"smallvec",
46124589
"tempfile",
46134590
"threadpool",
@@ -5593,13 +5570,6 @@ dependencies = [
55935570
"version_check",
55945571
]
55955572

5596-
[[package]]
5597-
name = "unicode-bdd"
5598-
version = "0.1.0"
5599-
dependencies = [
5600-
"ucd-parse",
5601-
]
5602-
56035573
[[package]]
56045574
name = "unicode-bidi"
56055575
version = "0.3.15"
@@ -5649,6 +5619,13 @@ version = "1.12.0"
56495619
source = "registry+https://github.com/rust-lang/crates.io-index"
56505620
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
56515621

5622+
[[package]]
5623+
name = "unicode-table-generator"
5624+
version = "0.1.0"
5625+
dependencies = [
5626+
"ucd-parse",
5627+
]
5628+
56525629
[[package]]
56535630
name = "unicode-width"
56545631
version = "0.1.14"

RELEASES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Stabilized APIs
123123
These APIs are now stable in const contexts:
124124

125125
- [`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
126-
- [`std::task::Waker::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
127126
- [`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
128127
- [`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
129128
- [`$integer::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)

compiler/rustc_abi/src/layout.rs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ enum NicheBias {
3939
End,
4040
}
4141

42-
#[derive(Copy, Clone, Debug)]
42+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
4343
pub enum LayoutCalculatorError<F> {
4444
/// An unsized type was found in a location where a sized type was expected.
4545
///
@@ -54,6 +54,36 @@ pub enum LayoutCalculatorError<F> {
5454

5555
/// A union had no fields.
5656
EmptyUnion,
57+
58+
/// The fields or variants have irreconcilable reprs
59+
ReprConflict,
60+
}
61+
62+
impl<F> LayoutCalculatorError<F> {
63+
pub fn without_payload(&self) -> LayoutCalculatorError<()> {
64+
match self {
65+
LayoutCalculatorError::UnexpectedUnsized(_) => {
66+
LayoutCalculatorError::UnexpectedUnsized(())
67+
}
68+
LayoutCalculatorError::SizeOverflow => LayoutCalculatorError::SizeOverflow,
69+
LayoutCalculatorError::EmptyUnion => LayoutCalculatorError::EmptyUnion,
70+
LayoutCalculatorError::ReprConflict => LayoutCalculatorError::ReprConflict,
71+
}
72+
}
73+
74+
/// Format an untranslated diagnostic for this type
75+
///
76+
/// Intended for use by rust-analyzer, as neither it nor `rustc_abi` depend on fluent infra.
77+
pub fn fallback_fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
78+
f.write_str(match self {
79+
LayoutCalculatorError::UnexpectedUnsized(_) => {
80+
"an unsized type was found where a sized type was expected"
81+
}
82+
LayoutCalculatorError::SizeOverflow => "size overflow",
83+
LayoutCalculatorError::EmptyUnion => "type is a union with no fields",
84+
LayoutCalculatorError::ReprConflict => "type has an invalid repr",
85+
})
86+
}
5787
}
5888

5989
type LayoutCalculatorResult<FieldIdx, VariantIdx, F> =
@@ -489,6 +519,10 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
489519
}
490520

491521
let dl = self.cx.data_layout();
522+
// bail if the enum has an incoherent repr that cannot be computed
523+
if repr.packed() {
524+
return Err(LayoutCalculatorError::ReprConflict);
525+
}
492526

493527
let calculate_niche_filling_layout = || -> Option<TmpLayout<FieldIdx, VariantIdx>> {
494528
if dont_niche_optimize_enum {

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
15741574
.collect();
15751575

15761576
// Introduce extra lifetimes if late resolution tells us to.
1577-
let extra_lifetimes = self.resolver.take_extra_lifetime_params(parent_node_id);
1577+
let extra_lifetimes = self.resolver.extra_lifetime_params(parent_node_id);
15781578
params.extend(extra_lifetimes.into_iter().filter_map(|(ident, node_id, res)| {
15791579
self.lifetime_res_to_generic_param(
15801580
ident,

0 commit comments

Comments
 (0)