Skip to content

Update subtree/library to 2025-07-11 #414

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
wants to merge 37 commits into
base: subtree/library
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

This is an automated PR to update the subtree/library branch to the changes from 2025-07-02 (rust-lang/rust@71e4c00) to 2025-07-11 (rust-lang/rust@2a023bf), 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 to subtree/library without any rebase or merge.

Daniel Bloom and others added 30 commits June 12, 2025 01:13
This PR adds a minimal `triagebot.toml` config to make contributions to
this repository respect upstream rust-lang/rust conventions and avoid
issues when syncing this subtree.
Rather than re-opening the archive file for each check, add a wrapper
that keeps the data in memory. Additionally, collect the `--target`
argument so it can be used within this crate.
Often our short summaries will pick up a Bors "Auto merge of #xxxx ...`
commit message. Replace these with something like `rust-lang#1234`
to avoid broken links when going between repositories.
…i256 and u256

`i256` and `u256`
- operators now use the same overflow convention as primitives
- implement `<<` and `-` (previously just `>>` and `+`)
- implement `Ord` correctly (the previous `PartialOrd` was broken)
- correct `i256::SIGNED` to `true`

The `Int`-trait is extended with `trailing_zeros`, `carrying_add`, and
`borrowing_sub`.
Currently we whether or not to build and test `f16` and `f128` support
mostly based on the target triple. This isn't always accurate, however,
since support also varies by backend and the backend version.

Since recently, `rustc` is aware of this with the unstable config option
`target_has_reliable_{f16,f128}`, which better represents when the types
are actually expected to be available and usable. Switch our
compiler-builtins and libm configuration to use this by probing `rustc`
for the target's settings.

A few small `cfg` fixes are needed with this.
This makes it more obvious what we intend to check rather than looking
for `--target`.
Rather than printing the entire JSON dump, use the rendered version.
8521530f4938 ("Fix __divsi3 and __udivsi3 on thumbv6m targets") removed
tests that use these `thumb*-linux` target files in favor of tests that
use the `thumb*-none` targets, which are available via Rustup. The JSON
files haven't been used since then and are outdated, so remove them.
The `rustc` probe done in our build scripts needs to pass `--target` to
get the correct configuration, which usually comes from the `TARGET`
environment variable. However, for targets specified via a `target.json`
file, `TARGET` gets set to the file name without an extension or path.
`rustc` will check a search path to attempt to locate the file, but this
is likely to fail since the directory where Cargo invokes build scripts
(and hence where those scripts invoke `rustc`) might not have any
relation to the JSON spec file.

Resolve this for now by leaving `f16` and `f128` disabled if the `rustc`
command fails. Result of the discussion at CARGO-14208 may eventually
provide a better solution.

A CI test is also added since custom JSON files are an edge case that
could fail in other ways. I verified this fails without the fix here.
The JSON file is the output for `thumbv7em-none-eabi`, just renamed so
`rustc` doesn't identify it.
instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the
panic data. Being a regular C++ exception, it interacts with the C++
exception handling machinery and can be retrieved via
`std::current_exception`, which needs to copy the exception. We can't
support that, so we panic, which throws another exception, which the
C++ runtime tries to copy and store into the exception_ptr, which panics
again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy
function will be dropped without being rethrown, and causes unnecessary
log spam in stderr. Fix this by directly throwing an exception without
data, which doesn't cause log spam and can be dropped without being
rethrown.
Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.
Update the `compiler-builtins` subtree

Update the Josh subtree to rust-lang/compiler-builtins@8aba4c899ee8.

r? `@ghost`
Add opaque TypeId handles for CTFE

Reopen of rust-lang#142789 (comment) after some bors insta-merge chaos

r? `@RalfJung`
…=petrochenkov

Fix `proc_macro::Ident`'s handling of `$crate`

This PR is addresses a few minor bugs, all relating to `proc_macro::Ident`'s support for `$crate`. `Ident` currently supports `$crate` (as can be seen in the `mixed-site-span` test), but:
* `proc_macro::Symbol::can_be_raw` is out of sync with `rustc_span::Symbol::can_be_raw`
  * former doesn't cover `$crate` while the latter does cover `kw::DollarCrate`
* `Ident::new` rejects `$crate`
  * This conflicts with the [reference definition](https://doc.rust-lang.org/nightly/reference/macros-by-example.html#r-macro.decl.meta.specifier) of `ident` which includes `$crate`.
  * This also conflicts with the documentation on [`Display for Ident`](https://doc.rust-lang.org/proc_macro/struct.Ident.html#impl-Display-for-Ident) which says the output "should be losslessly convertible back into the same identifier".

This PR fixes the above issues and extends the `mixed-site-span` test to exercise these fixed code paths, as well as validating the different possible spans resolve `$crate`  as expected (for both the new and old `$crate` construction code paths).
…heemdev

Mention as_chunks in the docs for chunks

and `as_rchunks_mut` from `rchunks_exact_mut`, and such.

As suggested in rust-lang#76354 (comment) (but does not close that issue).
…gross35

Move NaN tests to floats/mod.rs

This PR moves NaN tests to `floats/mod.rs`, as discussed in rust-lang#141726. Since this is my first PR against Rust, I'm keeping it as small as possible, but I intend to work my way through the remaining tests and can do that work in this PR if that's preferable.

r? RalfJung
bors and others added 7 commits July 10, 2025 10:08
Rollup of 9 pull requests

Successful merges:

 - rust-lang#141996 (Fix `proc_macro::Ident`'s handling of `$crate`)
 - rust-lang#142950 (mbe: Rework diagnostics for metavariable expressions)
 - rust-lang#143011 (Make lint `ambiguous_glob_imports` deny-by-default and report-in-deps)
 - rust-lang#143265 (Mention as_chunks in the docs for chunks)
 - rust-lang#143270 (tests/codegen/enum/enum-match.rs: accept negative range attribute)
 - rust-lang#143298 (`tests/ui`: A New Order [23/N])
 - rust-lang#143396 (Move NaN tests to floats/mod.rs)
 - rust-lang#143398 (tidy: add support for `--extra-checks=auto:` feature)
 - rust-lang#143644 (Add triagebot stdarch mention ping)

r? `@ghost`
`@rustbot` modify labels: rollup
…re-body, r=oli-obk

Add checking for unnecessary delims in closure body

Fixes rust-lang#136741
…, r=compiler-errors

docs: document trait upcasting rules in `Unsize` trait

The trait upcasting feature stabilized in 1.86 added new `Unsize` implementation, but this wasn't reflected in the trait's documentation.
Fix VxWorks build errors

fixes rust-lang#143442

r? ``@Noratrieb``
…r-errors

Constify `Fn*` traits

r? `@compiler-errors` `@fee1-dead`

this should unlock a few things. A few `const_closures` tests have broken even more than before, but that feature is marked as incomplete anyway

cc rust-lang#67792
…isDenton

Win: Use exceptions with empty data for SEH panic exception copies instead of a new panic

For unwinding with SEH, we currently construct a C++ exception with the panic data. Being a regular C++ exception, it interacts with the C++ exception handling machinery and can be retrieved via `std::current_exception`, which needs to copy the exception. We can't support that, so we panic, which throws another exception, which the C++ runtime tries to copy and store into the exception_ptr, which panics again, which causes the C++ runtime to store a `bad_exception` instance.

However, this doesn't work because the panics thrown by the copy function will be dropped without being rethrown, and causes unnecessary log spam in stderr. Fix this by directly throwing an exception without data, which doesn't cause log spam and can be dropped without being rethrown.

Fixes rust-lang#143623.

This also happens to be the solution ``@dpaoliello`` suggested, though I'm not sure how to handle the commit credit attribution.
Disable docs for `compiler-builtins` and `sysroot`

Bootstrap already had a manual doc filter for the `sysroot` crate, but
other library crates keep themselves out of the public docs by setting
`[lib] doc = false` in their manifest. This seems like a better solution
to hide `compiler-builtins` docs, and removes the `sysroot` hack too.

Fixes rust-lang#143215 (after backport)
```@rustbot``` label beta-nominated
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.