Skip to content

Rollup of 23 pull requests#159905

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

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

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.
@rustbot rustbot added 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 3a6add9 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

This comment has been minimized.

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

Successful merges:

 - #159673 (bootstrap: forward -fdebug-prefix-map when using cc)
 - #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)
 - #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-review Status: Awaiting review from the assignee but also interested parties. 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

💔 Test for 0725aa3 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors treeclosed=1000 spurious failures

@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Tree closed for PRs with priority less than 1000.

@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-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

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

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-msvc-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make\rustdoc-show-coverage stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\test\\run-make\\rustdoc-show-coverage\\rmake.exe"
stdout: none
--- stderr -------------------------------
"C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "--target=aarch64-pc-windows-msvc"
output status: `exit code: 0`
=== STDOUT ===
+-------------------------------------+------------+------------+------------+------------+
| File                                | Documented | Percentage |   Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| foo.rs                              |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total                               |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+



=== STDERR ===



"C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "-o" "-" "--target=aarch64-pc-windows-msvc"
output status: `exit code: 0`
=== STDOUT ===
+-------------------------------------+------------+------------+------------+------------+
| File                                | Documented | Percentage |   Examples | Percentage |
+-------------------------------------+------------+------------+------------+------------+
| foo.rs                              |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+
| Total                               |          0 |       0.0% |          0 |       0.0% |
+-------------------------------------+------------+------------+------------+------------+



=== STDERR ===



"C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "--output-format=json" "--target=aarch64-pc-windows-msvc"
output status: `exit code: 0`
=== STDOUT ===
{"foo.rs":{"total":3,"with_docs":0,"total_examples":2,"with_examples":0}}



=== STDERR ===



"C:\\a\\rust\\rust\\build\\aarch64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "--output-format=json" "-o" "-" "--target=aarch64-pc-windows-msvc"
output status: `exit code: 0`
=== STDOUT ===
{"foo.rs":{"total":3,"with_docs":0,"total_examples":2,"with_examples":0}}



=== STDERR ===

---



assert_contains_regex:
=== HAYSTACK ===
Generated output into "doc\\foo.txt"

=== NEEDLE ===
Generated output into "doc[/\\]foo.txt"


thread 'main' (9516) panicked at C:\a\rust\rust\tests\run-make\rustdoc-show-coverage\rmake.rs:40:5:
regex was not found in haystack
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
Currently active steps:
test::RunMake { test_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false }, target: aarch64-pc-windows-msvc } at src\bootstrap\src\core\build_steps\test.rs:1959
test::Compiletest { test_compiler: Compiler { stage: 2, host: aarch64-pc-windows-msvc, forced_compiler: false }, target: aarch64-pc-windows-msvc, mode: run-make, suite: "run-make", path: "tests/run-make", compare_mode: None } at src\bootstrap\src\core\build_steps\test.rs:1959
Build completed unsuccessfully in 1:51:48
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Sat Jul 25 16:32:59 CUT 2026
  network time: Sat, 25 Jul 2026 16:32:59 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

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.