forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 48
Update subtree/library to 2025-05-06 #356
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
Open
github-actions
wants to merge
13
commits into
subtree/library
Choose a base branch
from
update-subtree/library
base: subtree/library
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compiler & tools dependencies: Locking 36 packages to latest compatible versions Updating addr2line v0.21.0 -> v0.24.2 Updating anyhow v1.0.97 -> v1.0.98 Updating askama v0.13.0 -> v0.13.1 (available: v0.14.0) Updating askama_derive v0.13.0 -> v0.13.1 Updating backtrace v0.3.71 -> v0.3.74 Updating blake3 v1.8.1 -> v1.8.2 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating color-eyre v0.6.3 -> v0.6.4 Updating color-spantrace v0.2.1 -> v0.2.2 Updating derive-where v1.2.7 -> v1.4.0 Updating getrandom v0.2.15 -> v0.2.16 Removing gimli v0.28.1 Updating hashbrown v0.15.2 -> v0.15.3 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libm v0.2.11 -> v0.2.13 Removing object v0.32.2 Updating openssl-sys v0.9.107 -> v0.9.108 Adding owo-colors v4.2.0 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating psm v0.1.25 -> v0.1.26 Updating rand v0.9.0 -> v0.9.1 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating stacker v0.1.20 -> v0.1.21 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml_datetime v0.6.8 -> v0.6.9 Adding windows v0.61.1 Adding windows-collections v0.2.0 Adding windows-future v0.2.0 Adding windows-numerics v0.2.0 Updating winnow v0.7.6 -> v0.7.9 Updating zerocopy v0.8.24 -> v0.8.25 Updating zerocopy-derive v0.8.24 -> v0.8.25 note: pass `--verbose` to see 33 unchanged dependencies behind latest library dependencies: Locking 2 packages to latest compatible versions Removing allocator-api2 v0.2.21 Updating hashbrown v0.15.2 -> v0.15.3 Removing proc-macro2 v1.0.94 Removing quote v1.0.40 Updating rand v0.9.0 -> v0.9.1 Removing syn v2.0.100 Removing unicode-ident v1.0.18 Removing zerocopy v0.8.24 Removing zerocopy-derive v0.8.24 note: pass `--verbose` to see 3 unchanged dependencies behind latest rustbook dependencies: Locking 31 packages to latest compatible versions Updating ammonia v4.0.0 -> v4.1.0 Updating anyhow v1.0.97 -> v1.0.98 Updating cc v1.2.19 -> v1.2.21 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating clap_complete v4.5.47 -> v4.5.48 Adding cssparser v0.35.0 Adding cssparser-macros v0.6.1 Adding dtoa v1.0.10 Adding dtoa-short v0.3.5 Updating hashbrown v0.15.2 -> v0.15.3 Updating html5ever v0.27.0 -> v0.31.0 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libc v0.2.171 -> v0.2.172 Updating markup5ever v0.12.1 -> v0.16.1 Adding match_token v0.1.0 Adding phf_macros v0.11.3 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml v0.8.20 -> v0.8.22 Updating toml_datetime v0.6.8 -> v0.6.9 Updating toml_edit v0.22.24 -> v0.22.26 Adding toml_write v0.1.1 Adding web_atoms v0.1.1 Updating winnow v0.7.6 -> v0.7.9
This reverts commit ed5f31a.
…, r=lcnr stabilize ptr::swap_nonoverlapping in const Closes rust-lang#133668 The blocking issue mentioned there is resolved by documentation. We may in the future actually support such code, but that is blocked on rust-lang/const-eval#72 which is non-trivial to implement. Meanwhile, this completes stabilization of all `const fn` in `ptr`. :) Here's a version of the problematic example to play around with: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6c390452379fb593e109b8f8ee854d2a Should be FCP'd with both `@rust-lang/libs-api` and `@rust-lang/lang` since `swap_nonoverlapping` is documented to work as an "untyped" operation but due to the limitation mentioned above, that's not entirely true during const evaluation. I expect this limitation will only be hit in niche corner cases, so the benefits of having this function work most of the time outweigh the downsides of users running into this problem. (Note that unsafe code could already hit this limitation before this PR by doing cursed pointer casts, but having it hidden inside `swap_nonoverlapping` feels a bit different.)
…is-retain_mut, r=Mark-Simulacrum Suggest `retain_mut` over `retain` as `Vec::extract_if` alternative The docs for `Vec::extract_if` suggest using `Vec::retain` if the user doesn't need the removed item. Given that `extract_if` gives a mutable reference to the evaluated element, `retain_mut` is the most appropriate alternative, not `retain`.
Simpler predicate. Compare sample code output to that of the library function.
Includes the following changes: * Use runtime feature detection for fma routines on x86 [1] Fixes: rust-lang#140452 [1]: rust-lang/compiler-builtins#896
…acrum Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. The following is the output from `cargo update`: ```txt compiler & tools dependencies: Locking 36 packages to latest compatible versions Updating addr2line v0.21.0 -> v0.24.2 Updating anyhow v1.0.97 -> v1.0.98 Updating askama v0.13.0 -> v0.13.1 (available: v0.14.0) Updating askama_derive v0.13.0 -> v0.13.1 Updating backtrace v0.3.71 -> v0.3.74 Updating blake3 v1.8.1 -> v1.8.2 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating color-eyre v0.6.3 -> v0.6.4 Updating color-spantrace v0.2.1 -> v0.2.2 Updating derive-where v1.2.7 -> v1.4.0 Updating getrandom v0.2.15 -> v0.2.16 Removing gimli v0.28.1 Updating hashbrown v0.15.2 -> v0.15.3 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libm v0.2.11 -> v0.2.13 Removing object v0.32.2 Updating openssl-sys v0.9.107 -> v0.9.108 Adding owo-colors v4.2.0 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating psm v0.1.25 -> v0.1.26 Updating rand v0.9.0 -> v0.9.1 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating stacker v0.1.20 -> v0.1.21 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml_datetime v0.6.8 -> v0.6.9 Adding windows v0.61.1 Adding windows-collections v0.2.0 Adding windows-future v0.2.0 Adding windows-numerics v0.2.0 Updating winnow v0.7.6 -> v0.7.9 Updating zerocopy v0.8.24 -> v0.8.25 Updating zerocopy-derive v0.8.24 -> v0.8.25 note: pass `--verbose` to see 33 unchanged dependencies behind latest library dependencies: Locking 2 packages to latest compatible versions Removing allocator-api2 v0.2.21 Updating hashbrown v0.15.2 -> v0.15.3 Removing proc-macro2 v1.0.94 Removing quote v1.0.40 Updating rand v0.9.0 -> v0.9.1 Removing syn v2.0.100 Removing unicode-ident v1.0.18 Removing zerocopy v0.8.24 Removing zerocopy-derive v0.8.24 note: pass `--verbose` to see 3 unchanged dependencies behind latest rustbook dependencies: Locking 31 packages to latest compatible versions Updating ammonia v4.0.0 -> v4.1.0 Updating anyhow v1.0.97 -> v1.0.98 Updating cc v1.2.19 -> v1.2.21 Updating chrono v0.4.40 -> v0.4.41 Updating clap v4.5.36 -> v4.5.37 Updating clap_builder v4.5.36 -> v4.5.37 Updating clap_complete v4.5.47 -> v4.5.48 Adding cssparser v0.35.0 Adding cssparser-macros v0.6.1 Adding dtoa v1.0.10 Adding dtoa-short v0.3.5 Updating hashbrown v0.15.2 -> v0.15.3 Updating html5ever v0.27.0 -> v0.31.0 Updating jiff v0.2.6 -> v0.2.12 Updating jiff-static v0.2.6 -> v0.2.12 Updating libc v0.2.171 -> v0.2.172 Updating markup5ever v0.12.1 -> v0.16.1 Adding match_token v0.1.0 Adding phf_macros v0.11.3 Updating proc-macro2 v1.0.94 -> v1.0.95 Updating redox_syscall v0.5.11 -> v0.5.12 Updating rustix v1.0.5 -> v1.0.7 Updating sha2 v0.10.8 -> v0.10.9 Updating syn v2.0.100 -> v2.0.101 Updating synstructure v0.13.1 -> v0.13.2 Updating toml v0.8.20 -> v0.8.22 Updating toml_datetime v0.6.8 -> v0.6.9 Updating toml_edit v0.22.24 -> v0.22.26 Adding toml_write v0.1.1 Adding web_atoms v0.1.1 Updating winnow v0.7.6 -> v0.7.9 ```
…gross35 Correct `extract_if` sample equivalent. Tracking issue: rust-lang#43244 Original PR: rust-lang#133265 The sample code marked as equivalent in the doc comment isn't currently equivalent. Given the same predicate and range, if your vector were `[1, 2, 3, 3, 3, 3, 3, 3, 4, 5, 6]`, then all of the 3s would be removed. `i` is only incremented when an element is dropped, but `range.end` is unchanged, so the items shift down. I got very confused when reading the docs and trying to square this sample code with the explanation of how the function works. Fortunately, the real `extract_if()` does not have this problem. I've added an `end` variable to align the behavior. I've also taken the opportunity to simplify the predicate, which now just matches odd numbers, and to pad out the vec of numbers to line up the zero-indexed range with the integers in the vec. r? the8472
…, r=Mark-Simulacrum Revert "Avoid unused clones in Cloned<I> and Copied<I>" Per libs decision in rust-lang#140207 (comment) this reverts commit ed5f31a (rust-lang#139745)
Update `compiler-builtins` to 0.1.157 Includes the following changes: * Use runtime feature detection for fma routines on x86 [1] Fixes: rust-lang#140452 [1]: rust-lang/compiler-builtins#896
Rollup of 4 pull requests Successful merges: - rust-lang#135734 (Correct `extract_if` sample equivalent.) - rust-lang#140307 (Refactor rustc_on_unimplemented's filter parser) - rust-lang#140644 (Revert "Avoid unused clones in Cloned<I> and Copied<I>") - rust-lang#140648 (Update `compiler-builtins` to 0.1.157) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated PR to update the subtree/library branch to the changes from 2025-04-24 (rust-lang/rust@df35ff6) to 2025-05-06 (rust-lang/rust@2e6882a), inclusive.
Review this PR as usual, but do not merge this PR using the GitHub web interface. Instead, once it is approved, use
git push
to literally push the changes tosubtree/library
without any rebase or merge.