Skip to content

Commit

Permalink
Auto merge of rust-lang#3980 - rust-lang:rustup-2024-10-20, r=RalfJung
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Oct 20, 2024
2 parents 3386ae2 + ccd680e commit 45a9a7c
Show file tree
Hide file tree
Showing 675 changed files with 10,404 additions and 4,840 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ jobs:
with:
fetch-depth: 2

# Free up disk space on Linux by removing preinstalled components that
# we do not need. We do this to enable some of the less resource
# intensive jobs to run on free runners, which however also have
# less disk space.
- name: free up disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
if: contains(matrix.os, 'ubuntu')
with:
# Removing packages with APT saves ~5 GiB, but takes several
# minutes (and potentially removes important packages).
large-packages: false

# Rust Log Analyzer can't currently detect the PR number of a GitHub
# Actions build on its own, so a hint in the log message is needed to
# point it in the right direction.
Expand Down Expand Up @@ -194,6 +206,11 @@ jobs:
- name: create github artifacts
run: src/ci/scripts/create-doc-artifacts.sh

- name: print disk usage
run: |
echo "disk usage:"
df -h
- name: upload artifacts to github
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ build/
/src/tools/x/target
# Created by default with `src/ci/docker/run.sh`
/obj/
# Created by nix dev shell / .envrc
src/tools/nix-dev-shell/flake.lock

## ICE reports
rustc-ice-*.txt
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub.bukaj@yahoo.com>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakub@jakub.cc>
Jakub Adam Wieczorek <jakub.adam.wieczorek@gmail.com> <jakubw@jakubw.net>
Jakub Beránek <berykubik@gmail.com> <jakub.beranek@vsb.cz>
James [Undefined] <tpzker@thepuzzlemaker.info>
James Deng <cnjamesdeng@gmail.com> <cnJamesDeng@gmail.com>
James Hinshelwood <jameshinshelwood1@gmail.com> <james.hinshelwood@bigpayme.com>
Expand Down
61 changes: 19 additions & 42 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ dependencies = [
"cargo_metadata",
"directories",
"rustc-build-sysroot",
"rustc_tools_util 0.4.0",
"rustc_tools_util",
"rustc_version",
"serde",
"serde_json",
Expand Down Expand Up @@ -537,7 +537,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"

[[package]]
name = "clippy"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anstream",
"cargo_metadata",
Expand All @@ -550,9 +550,11 @@ dependencies = [
"if_chain",
"itertools",
"parking_lot",
"pulldown-cmark 0.11.3",
"quote",
"regex",
"rustc_tools_util 0.3.0",
"rinja",
"rustc_tools_util",
"serde",
"serde_json",
"syn 2.0.79",
Expand All @@ -566,7 +568,7 @@ dependencies = [

[[package]]
name = "clippy_config"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"itertools",
"serde",
Expand All @@ -582,20 +584,19 @@ dependencies = [
"clap",
"indoc",
"itertools",
"opener 0.6.1",
"opener",
"shell-escape",
"walkdir",
]

[[package]]
name = "clippy_lints"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"arrayvec",
"cargo_metadata",
"clippy_config",
"clippy_utils",
"declare_clippy_lint",
"itertools",
"quine-mc_cluskey",
"regex",
Expand All @@ -613,7 +614,7 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"arrayvec",
"clippy_config",
Expand Down Expand Up @@ -919,15 +920,6 @@ dependencies = [
"winapi",
]

[[package]]
name = "declare_clippy_lint"
version = "0.1.83"
dependencies = [
"itertools",
"quote",
"syn 2.0.79",
]

[[package]]
name = "deranged"
version = "0.3.11"
Expand Down Expand Up @@ -2163,7 +2155,7 @@ dependencies = [
"log",
"memchr",
"once_cell",
"opener 0.7.2",
"opener",
"pulldown-cmark 0.10.3",
"regex",
"serde",
Expand Down Expand Up @@ -2501,17 +2493,6 @@ dependencies = [
"stable_deref_trait",
]

[[package]]
name = "opener"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788"
dependencies = [
"bstr",
"normpath",
"winapi",
]

[[package]]
name = "opener"
version = "0.7.2"
Expand Down Expand Up @@ -2879,6 +2860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625"
dependencies = [
"bitflags 2.6.0",
"getopts",
"memchr",
"pulldown-cmark-escape 0.11.0",
"unicase",
Expand Down Expand Up @@ -4460,12 +4442,6 @@ dependencies = [
"tracing",
]

[[package]]
name = "rustc_tools_util"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ba09476327c4b70ccefb6180f046ef588c26a24cf5d269a9feba316eb4f029f"

[[package]]
name = "rustc_tools_util"
version = "0.4.0"
Expand Down Expand Up @@ -4608,6 +4584,7 @@ dependencies = [
"rustdoc-json-types",
"serde",
"serde_json",
"sha2",
"smallvec",
"tempfile",
"threadpool",
Expand Down Expand Up @@ -5593,13 +5570,6 @@ dependencies = [
"version_check",
]

[[package]]
name = "unicode-bdd"
version = "0.1.0"
dependencies = [
"ucd-parse",
]

[[package]]
name = "unicode-bidi"
version = "0.3.15"
Expand Down Expand Up @@ -5649,6 +5619,13 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"

[[package]]
name = "unicode-table-generator"
version = "0.1.0"
dependencies = [
"ucd-parse",
]

[[package]]
name = "unicode-width"
version = "0.1.14"
Expand Down
1 change: 0 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Stabilized APIs
These APIs are now stable in const contexts:

- [`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
- [`std::task::Waker::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
- [`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
- [`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
- [`$integer::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)
Expand Down
36 changes: 35 additions & 1 deletion compiler/rustc_abi/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum NicheBias {
End,
}

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

/// A union had no fields.
EmptyUnion,

/// The fields or variants have irreconcilable reprs
ReprConflict,
}

impl<F> LayoutCalculatorError<F> {
pub fn without_payload(&self) -> LayoutCalculatorError<()> {
match self {
LayoutCalculatorError::UnexpectedUnsized(_) => {
LayoutCalculatorError::UnexpectedUnsized(())
}
LayoutCalculatorError::SizeOverflow => LayoutCalculatorError::SizeOverflow,
LayoutCalculatorError::EmptyUnion => LayoutCalculatorError::EmptyUnion,
LayoutCalculatorError::ReprConflict => LayoutCalculatorError::ReprConflict,
}
}

/// Format an untranslated diagnostic for this type
///
/// Intended for use by rust-analyzer, as neither it nor `rustc_abi` depend on fluent infra.
pub fn fallback_fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match self {
LayoutCalculatorError::UnexpectedUnsized(_) => {
"an unsized type was found where a sized type was expected"
}
LayoutCalculatorError::SizeOverflow => "size overflow",
LayoutCalculatorError::EmptyUnion => "type is a union with no fields",
LayoutCalculatorError::ReprConflict => "type has an invalid repr",
})
}
}

type LayoutCalculatorResult<FieldIdx, VariantIdx, F> =
Expand Down Expand Up @@ -489,6 +519,10 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}

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

let calculate_niche_filling_layout = || -> Option<TmpLayout<FieldIdx, VariantIdx>> {
if dont_niche_optimize_enum {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
.collect();

// Introduce extra lifetimes if late resolution tells us to.
let extra_lifetimes = self.resolver.take_extra_lifetime_params(parent_node_id);
let extra_lifetimes = self.resolver.extra_lifetime_params(parent_node_id);
params.extend(extra_lifetimes.into_iter().filter_map(|(ident, node_id, res)| {
self.lifetime_res_to_generic_param(
ident,
Expand Down
Loading

0 comments on commit 45a9a7c

Please sign in to comment.