Skip to content

Rollup of 23 pull requests#159903

Closed
GuillaumeGomez wants to merge 91 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-C5Wk3Te
Closed

Rollup of 23 pull requests#159903
GuillaumeGomez wants to merge 91 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-C5Wk3Te

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

celinval and others added 30 commits July 13, 2026 04:53
Expose the internal `requires_caller_location` query through
rustc_public so tools can detect when an instance has an implicit
extra `&'static Location<'static>` argument in its ABI that is
not present in the MIR body signature.

Fixes rust-lang/rustc_public#123
Add an API to construct the `&'static Location<'static>` constant
that must be passed as the implicit extra argument when calling a
`#[track_caller]` function. Users provide the span of the call
site (or the callee's definition span for reify shim fallback).

Fixes rust-lang/rustc_public#62
The `test_dir_remove_file` test currently fails under Windows 7 on:

```
thread 'fs::tests::test_dir_remove_file' (2028) panicked at library/std/src/fs/tests.rs:2590:5:
dir.remove_file("foo.txt") failed with: The parameter is incorrect. (os error 87)
```

Looking into it, this is because the `FILE_DISPOSITION_INFO_EX` variant
of the `SetFileInformationByHandle` API is used while it is only
available starting from Windows 10 1607. However,
`FILE_DISPOSITION_INFO` is still available since Vista.

This is therefore fixed by introducing a fallback to the latter API if
the former fails. This is achieved by re-using some logic that is
already available through `File::delete` and that does exactly this.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
Add a method Body::caller_location that resolves the correct caller
location constant for a call to a #[track_caller] function, walking
inlined source scopes to handle MIR inlining correctly.

Body now stores source scope data as a public field. Body::new
populates it with empty entries (no inlining info); bodies obtained
from the compiler have full scope data populated.

Span::as_caller_location is now pub(crate) since users should use
Body::caller_location instead, which handles inlining correctly.
also add a test for cross-crate static initializers
The string `#[target_features]` is used in various error messages as
well as the compiler's code. But there is no such attribute, which I
found very confusing.

I think it means "one or more target features", e.g. covering both
`#[target_feature(foo)]` and `#[target_feature(foo, bar, baz)]`.

We already use `#[target_feature(..)]` for that meaning in several
places. So this commit changes all `#[target_features]` occurrences to
`#[target_feature(..)]`. It also changes a few `#[target_feature]` (no
plural) occurrences to `#[target_feature(..)]` for consistency with
other mentions nearby in error messages.
PoisonError::new is defined twice, once under #[cfg(panic = "unwind")]
and once under its negation, so exactly one definition exists in any
given build. rustdoc's auto_cfg only sees whichever cfg survived
expansion and tags the method as available under that cfg only, even
though it is callable in every configuration - it just panics under
panic=abort instead of returning.

Disable auto_cfg on both variants so the portability note stops
implying the method doesn't exist elsewhere. The doc comment already
explains the panic=abort behavior in prose, so the cfg doesn't need to
leak into the generated badge.

Add a minimal regression test.
Revert "Export `derive` at `core::derive` and `std::derive`"

This reverts commit fec0998.

Temporarily addresses rust-lang#159856 until we get the stability attribute to actually work...
bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`

During the bootstrap stage0 redesign, `compiletest-use-stage0-libtest` was needed as a workaround for big regressions in compiletest build times, due to compiletest's dependency on libtest or `#![feature(internal_output_capture)]`.

As of rust-lang#146929, compiletest has no dependency on libtest or any unstable features, and is always built with the stage0 compiler. Since then, `compiletest-use-stage0-libtest` has had no effect, and was retained only to avoid breaking people's builds if they had that option set.

Several months later, it should be fine to remove the option entirely.

r? jieyouxu (or bootstrap)
Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide

Related issue: rust-lang#159751

Updates the expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide.
…uwer

Split multiline derives into std/rustc macros

Misc cleanup
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@f5333a6.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 25, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 25, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@bors r+ p=5 rollup=never

@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fdf73ec has been approved by GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 25, 2026
@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit fdf73ec with merge 91fd797...

Workflow: https://github.com/rust-lang/rust/actions/runs/30161618020

rust-bors Bot pushed a commit that referenced this pull request Jul 25, 2026
Rollup of 23 pull requests

Successful merges:

 - #159720 (document #[global_allocator] constraints)
 - #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
 - #159738 (implement `CovariantUnsafeCell`)
 - #159740 (reuse regular exported_non_generic_symbols logic in Miri)
 - #159780 (check `extern "custom"` function pointers)
 - #159786 (rustdoc-js: ignore editor temp files in test folder discovery)
 - #159819 (std::sync::poison: disable auto_cfg on PoisonError::new)
 - #155388 (stepping into where-clauses during normalization may be productive)
 - #155914 (when bailing on ambiguity, don't force other results to ambig)
 - #159204 (Add support to caller_location to rustc_public)
 - #159411 ([rustdoc] Correctly handle output options with --show-coverage)
 - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
 - #159676 (Update wasm-component-ld to 0.5.27)
 - #159730 (allow accessing the contents of UnsafeCell without going through get)
 - #159809 (Avoid `#[target_features]`)
 - #159810 (Add tuple never coercion collection regression test)
 - #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
 - #159853 (Updated expect messages for `CString` struct and method documentation)
 - #159877 (Revert "Export `derive` at `core::derive` and `std::derive`")
 - #159878 (bootstrap: Remove obsolete option `build.compiletest-use-stage0-libtest`)
 - #159882 (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide)
 - #159891 (Split multiline derives into std/rustc macros)
 - #159895 (rustc-dev-guide subtree update)
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 25, 2026
@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

PR #159877, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 25, 2026
@GuillaumeGomez
GuillaumeGomez deleted the rollup-C5Wk3Te branch July 25, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.