Skip to content

Merge subtree update for toolchain nightly-2025-04-04 #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10,000 commits into from
Apr 9, 2025
Merged

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Apr 8, 2025

This is an automated PR to merge library subtree updates from 2025-04-01 (rust-lang/rust@0b45675) to 2025-04-04 (rust-lang/rust@00095b3), inclusive. This is a clean merge, no conflicts were detected. Do not remove or edit the following annotations:
git-subtree-dir: library
git-subtree-split: 0cce469

oli-obk and others added 30 commits March 11, 2025 12:05
The LLVM issue [1] was fixed with [2], which is included in the LLVM20
upgrade. Tests no longer fail, so enable them here.

[1]: llvm/llvm-project#98681
[2]: llvm/llvm-project#98681
…kingjubilee

[AIX] Fix hangs during testing

Fixes all current test hangs experienced during CI runs.
1. ipv6 link-local (the loopback device) gets assigned an automatic zone id of 1, causing the assert to fail and hang in `library/std/src/net/udp/tests.rs`
2. Const alloc does not fail gracefully
3. Debuginfo test has problem with gdb auto load safe path
Due to a reorganization in the `libc` crate, the `xous` target broke
with version `0.2.170`. Bump libc to `0.2.171` to fix nightly.

Signed-off-by: Sean Cross <[email protected]>
This improves the useability of heaps for priority-based work queues. In
certain scenarios, modifications on the most relevant or critical items are
performed until a condition that determines the work items have been
sufficiently addressed. The loop will repeatedly access the most critical
item and put it back in a sorted position when it is complete. Crucially,
due to the ordering invariant we know that all work was performed when the
completed item remains the most critical. Getting this information from the
heap position avoids a (potentially more costly) check on the item state
itself.

A customized `drop` with boolean result would avoid up to two more
comparisons performed in both the last no-op refresh and Drop code but this
occurs once in each execution of the above scenario whereas refresh occurs
any number of times. Also note that the comparison overhead of Drop is only
taken if the element is mutably inspected to determine the end condition,
i.e. not when refresh itself is the break condition.
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type

Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed.

A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table.

Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable.

Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature.

One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now.

fixes rust-lang#131298
…valle

Disable CFI for weakly linked syscalls

Currently, when enabling CFI via -Zsanitizer=cfi and executing e.g. std::sys::random::getrandom, we can observe a CFI violation. This is the case for all consumers of the std::sys::pal::weak::syscall macro, as it is defining weak functions which don't show up in LLVM IR metadata. CFI fails for all these functions.

Similar to other such cases in
rust-lang#115199, this change stops emitting the CFI typecheck for consumers of the macro via the `#[no_sanitize(cfi)]` attribute.

r? ``````@rcvalle``````
We can create the expected error manually, rather than trying to produce
a real one, so the error conversion test can run on all targets. Before,
it was only running on 64-bit and not miri.

In Fedora, we also found that s390x was not getting the expected error,
"successfully" allocating the huge size because it was optimizing the
real `malloc` call away. It's possible to counter that by looking at the
pointer in any way, like a debug print, but it's more robust to just
deal with errors directly, since this test is only about conversion.
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#137715 (Allow int literals for pattern types with int base types)
 - rust-lang#138002 (Disable CFI for weakly linked syscalls)
 - rust-lang#138051 (Add support for downloading GCC from CI)
 - rust-lang#138231 (Prevent ICE in autodiff validation by emitting user-friendly errors)
 - rust-lang#138245 (stabilize `ci_rustc_if_unchanged_logic` test for local environments)
 - rust-lang#138256 (Do not feed anon const a type that references generics that it does not have)
 - rust-lang#138284 (Do not write user type annotation for const param value path)
 - rust-lang#138296 (Remove `AdtFlags::IS_ANONYMOUS` and `Copy`/`Clone` condition for anonymous ADT)
 - rust-lang#138352 (miri native_calls: ensure we actually expose *mutable* provenance to the memory FFI can access)
 - rust-lang#138354 (remove redundant `body`  arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
It reinterprets uninitialized memory as initialized and does not drop
existing elements of the Vec. Fix that.

Additionally, make it more general by appending, instead of overwriting
existing elements, and rename it to `append_to_enclave_vec`. A caller
can simply call `.clear()` before, for the old behavior.
…, r=dtolnay

Add PeekMut::refresh

I'm not sure if this should go through ACP or not. BinaryHeap is not the most critical data structure in the standard library and it would be understandable if maintainer throughput is thus too limited to accept this PR without a proper design phase that ensures the required understanding of consequence over a longer time period.

This aims to improve the useability of heaps for priority-based work queues. In certain scenarios, modifications on the most relevant or critical items are performed until a condition that determines the work items have been sufficiently addressed. For instance the criticality could be a deadline that is relaxed whenever some part of a work item is completed. Such a loop will repeatedly access the most critical item and put it back in a sorted position when it is complete. Crucially, due to the ordering invariant we know that all necessary work was performed when the completed item remains the most critical. Getting this information from the heap position avoids a (potentially more costly) check on the item state itself.

A customized `drop` with boolean result would avoid up to two more comparisons performed in both the last no-op refresh and Drop code but this occurs once in each execution of the above scenario whereas refresh occurs any number of times. Also note that the comparison overhead of Drop is only taken if the element is mutably inspected to determine the end condition, i.e. not when refresh itself is the break condition.
clubby789 and others added 12 commits April 1, 2025 20:50
…acrum

Update dependencies

rust-lang#136077 needs manual tweaking
```
    compiler and tools dependencies
        Updating anyhow v1.0.95 -> v1.0.97
        Updating basic-toml v0.1.9 -> v0.1.10
        Updating bitflags v2.8.0 -> v2.9.0
        Updating blake3 v1.5.5 -> v1.8.0
        Updating bumpalo v3.16.0 -> v3.17.0
        Removing byteorder v1.5.0
        Updating bytes v1.9.0 -> v1.10.1
        Updating cargo_metadata v0.19.1 -> v0.19.2
        Updating chrono v0.4.39 -> v0.4.40
        Updating chrono-tz v0.10.1 -> v0.10.3
        Updating chrono-tz-build v0.4.0 -> v0.4.1
        Updating clap v4.5.26 -> v4.5.35
        Updating clap_builder v4.5.26 -> v4.5.35
        Updating clap_derive v4.5.24 -> v4.5.35
        Updating console v0.15.10 -> v0.15.11
        Updating cpufeatures v0.2.16 -> v0.2.17
        Updating curl-sys v0.4.78+curl-8.11.0 -> v0.4.80+curl-8.12.1
        Updating darling v0.20.10 -> v0.20.11
        Updating darling_core v0.20.10 -> v0.20.11
        Updating darling_macro v0.20.10 -> v0.20.11
        Updating deranged v0.3.11 -> v0.4.1
        Updating dissimilar v1.0.9 -> v1.0.10
        Updating either v1.13.0 -> v1.15.0
        Updating elsa v1.11.0 -> v1.11.2
        Updating env_logger v0.11.6 -> v0.11.7
        Updating equivalent v1.0.1 -> v1.0.2
        Updating flate2 v1.0.35 -> v1.1.0
        Updating foldhash v0.1.4 -> v0.1.5
        Updating getrandom v0.3.1 -> v0.3.2
        Updating globset v0.4.15 -> v0.4.16
     Downgrading html5ever v0.29.2 -> v0.29.1 (available: v0.30.0)
        Updating humantime v2.1.0 -> v2.2.0
        Updating icu_list_data v1.5.0 -> v1.5.1
        Updating icu_locid_transform_data v1.5.0 -> v1.5.1
        Updating icu_normalizer_data v1.5.0 -> v1.5.1
        Updating icu_properties_data v1.5.0 -> v1.5.1
        Updating indexmap v2.7.0 -> v2.8.0
        Updating indicatif v0.17.9 -> v0.17.11
        Updating inout v0.1.3 -> v0.1.4
        Updating itoa v1.0.14 -> v1.0.15
          Adding jiff v0.2.5
          Adding jiff-static v0.2.5
        Updating jobserver v0.1.32 -> v0.1.33
        Updating lexopt v0.3.0 -> v0.3.1
          Adding leb128fmt v0.1.0
        Updating libc v0.2.169 -> v0.2.171
        Updating libz-sys v1.1.21 -> v1.1.22
        Updating linux-raw-sys v0.4.15 -> v0.9.3
        Updating litemap v0.7.4 -> v0.7.5
        Updating log v0.4.25 -> v0.4.27
     Downgrading markup5ever v0.15.0 -> v0.14.1
        Updating miniz_oxide v0.8.3 -> v0.8.5
        Updating once_cell v1.20.2 -> v1.21.3
        Updating openssl-probe v0.1.5 -> v0.1.6
        Updating openssl-sys v0.9.104 -> v0.9.106
        Updating pest v2.7.15 -> v2.8.0
        Updating pest_derive v2.7.15 -> v2.8.0
        Updating pest_generator v2.7.15 -> v2.8.0
        Updating pest_meta v2.7.15 -> v2.8.0
        Updating pkg-config v0.3.31 -> v0.3.32
        Updating portable-atomic v1.10.0 -> v1.11.0
          Adding portable-atomic-util v0.2.4
        Updating ppv-lite86 v0.2.20 -> v0.2.21
        Updating proc-macro2 v1.0.93 -> v1.0.94
        Updating quote v1.0.38 -> v1.0.40
          Adding r-efi v5.2.0
        Updating rand_core v0.9.0 -> v0.9.3
        Updating redox_syscall v0.5.8 -> v0.5.10
        Updating rustc-stable-hash v0.1.1 -> v0.1.2
        Updating rustc_tools_util v0.4.0 -> v0.4.2
        Updating rustix v0.38.43 -> v1.0.5
        Updating rustversion v1.0.19 -> v1.0.20
        Updating ryu v1.0.18 -> v1.0.20
        Updating semver v1.0.24 -> v1.0.26
        Updating serde v1.0.217 -> v1.0.219
        Updating serde_derive v1.0.217 -> v1.0.219
        Updating serde_json v1.0.135 -> v1.0.140
        Updating similar v2.6.0 -> v2.7.0
        Updating smallvec v1.13.2 -> v1.14.0
        Updating socket2 v0.5.8 -> v0.5.9
        Updating stacker v0.1.18 -> v0.1.20
        Updating string_cache v0.8.8 -> v0.8.9
        Updating syn v2.0.96 -> v2.0.100
        Updating tar v0.4.43 -> v0.4.44
        Updating tempfile v3.15.0 -> v3.19.1
        Updating thin-vec v0.2.13 -> v0.2.14
        Updating thiserror v2.0.11 -> v2.0.12
        Updating thiserror-impl v2.0.11 -> v2.0.12
        Updating time v0.3.37 -> v0.3.41
        Updating time-core v0.1.2 -> v0.1.4
        Updating time-macros v0.2.19 -> v0.2.22
        Updating tinyvec v1.8.1 -> v1.9.0
        Updating tokio v1.43.0 -> v1.44.1
        Updating typenum v1.17.0 -> v1.18.0
        Updating unicode-ident v1.0.14 -> v1.0.18
        Updating uuid v1.12.0 -> v1.16.0
        Updating wasi v0.13.3+wasi-0.2.2 -> v0.14.2+wasi-0.2.4
        Removing wasm-encoder v0.219.1
        Removing wasm-encoder v0.223.0
          Adding wasm-encoder v0.219.2 (available: v0.227.1)
          Adding wasm-encoder v0.223.1
          Adding wasm-encoder v0.228.0
        Updating wasm-metadata v0.223.0 -> v0.223.1
        Removing wasmparser v0.219.1
        Removing wasmparser v0.222.0
        Removing wasmparser v0.223.0
          Adding wasmparser v0.219.2 (available: v0.227.1)
          Adding wasmparser v0.222.1
          Adding wasmparser v0.223.1
          Adding wasmparser v0.228.0
        Updating wast v223.0.0 -> v228.0.0
        Updating wat v1.223.0 -> v1.228.0
        Updating windows-core v0.52.0 -> v0.61.0
          Adding windows-implement v0.60.0
        Updating windows-interface v0.59.0 -> v0.59.1
          Adding windows-link v0.1.1
        Updating windows-result v0.3.0 -> v0.3.2
        Updating windows-strings v0.3.0 -> v0.3.1
          Adding windows-strings v0.4.0
        Updating wit-bindgen-rt v0.33.0 -> v0.39.0
        Updating wit-component v0.223.0 -> v0.223.1
        Updating wit-parser v0.223.0 -> v0.223.1
        Updating xattr v1.4.0 -> v1.5.0
        Updating zerocopy v0.8.14 -> v0.8.24
        Updating zerocopy-derive v0.8.14 -> v0.8.24
        Updating zerofrom v0.1.5 -> v0.1.6
        Updating zerofrom-derive v0.1.5 -> v0.1.6
```
Add `opt-level = "s"` for more std symbolication crates

This reduces the size of a hello world binary built by stage 1 in release by a few kilobytes
Do the following:

* Switch to `impl FnOnce` rather than a generic `F`.
* Change `update` to return nothing.

This was discussed at a libs-api meeting [1].

Tracking issue: rust-lang#50186

[1]: rust-lang#134446 (comment)
slice: Remove some uses of unsafe in first/last chunk methods

Remove unsafe `split_at_unchecked` and `split_at_mut_unchecked` in some slice `split_first_chunk`/`split_last_chunk` methods.
Replace those calls with the safe `split_at` and `split_at_checked` where applicable.

Add codegen tests to check for no panics when calculating the last chunk index using `checked_sub` and `split_at`.

Better viewed with whitespace disabled in diff view

---

The unchecked calls are mostly manual implementations of the safe methods, but with the safety condition negated from `mid <= len` to `len < mid`.
```rust
if self.len() < N {
    None
} else {
    // SAFETY: We manually verified the bounds of the split.
    let (first, tail) = unsafe { self.split_at_unchecked(N) };
    // Or for the last_chunk methods
    let (init, last) = unsafe { self.split_at_unchecked(self.len() - N) };
```

Unsafe is still needed for the pointer array casts. Their safety comments are unmodified.
…pratt

Apply requested API changes to `cell_update`

Do the following:

* Switch to `impl FnOnce` rather than a generic `F`.
* Change `update` to return nothing.

This was discussed at a libs-api meeting [1].

Tracking issue: rust-lang#50186

[1]: rust-lang#134446 (comment)
…iter, r=dtolnay

Make slice iterator constructors unstably const

See [tracking issue](rust-lang#137737) for justification.

try-job: aarch64-apple
try-job: x86_64-gnu
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139080 (Experimental feature gate for `super let`)
 - rust-lang#139145 (slice: Remove some uses of unsafe in first/last chunk methods)
 - rust-lang#139149 (unstable book: document import_trait_associated_functions)
 - rust-lang#139273 (Apply requested API changes to `cell_update`)
 - rust-lang#139282 (rustdoc: make settings checkboxes always square)
 - rust-lang#139283 (Rustc dev guide subtree update)
 - rust-lang#139294 (Fix the `f16`/`f128` feature gates on integer literals)

r? `@ghost`
`@rustbot` modify labels: rollup
@github-actions github-actions bot requested a review from a team as a code owner April 8, 2025 14:10
@carolynzech carolynzech closed this Apr 8, 2025
@carolynzech carolynzech reopened this Apr 8, 2025
@tautschnig tautschnig enabled auto-merge April 8, 2025 19:04
@tautschnig tautschnig added this pull request to the merge queue Apr 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 8, 2025
@tautschnig
Copy link
Member

Looks like the partition-4 task when run as part of the merge queue ended with "goto-cc exited with status signal: 6 (SIGABRT)" -- don't know why this might happen, but let's first have the VeriFast PR go in, then squash changes into this branch, and then re-try.

@tautschnig tautschnig self-assigned this Apr 8, 2025
@carolynzech carolynzech enabled auto-merge April 9, 2025 02:30
@carolynzech carolynzech added this pull request to the merge queue Apr 9, 2025
Merged via the queue into main with commit 659982c Apr 9, 2025
21 checks passed
@tautschnig tautschnig deleted the sync-2025-04-04 branch April 9, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.