Skip to content

Rollup of 16 pull requests#159876

Closed
jhpratt wants to merge 69 commits into
rust-lang:mainfrom
jhpratt:rollup-F4LwxHl
Closed

Rollup of 16 pull requests#159876
jhpratt wants to merge 69 commits into
rust-lang:mainfrom
jhpratt:rollup-F4LwxHl

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 25, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

notriddle and others added 30 commits July 3, 2026 00:08
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
This is probably not what the user wants:

    error: nested Markdown emphasis in HTML `style` tag
      --> $DIR/invalid-html-tags-correct-script-style.rs:11:16
       |
    LL | /// One <style>*emph*</style>
       |                ^^^^^^ Markdown translates this into HTML, but the browser parses it as CSS
       |
    help: to turn off Markdown parsing, put the tag at the start of the line
       |
    LL ~ /// One
    LL ~ /// <style>*emph*</style>
       |
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>
Canonicalize and evaluate next-gen region constraints before query response canonicalization so equivalent constraints merge structurally.
Cover the dyn object supertrait case that used to leave equivalent next-gen region constraints in different shapes.
This is currently a no-op, but will be useful when const in `global_asm!`
can be pointers.
Currently global_asm already have symbol names when using v0 scheme, this
makes them obtain symbols with legacy scheme too.
This gives the asm-const code the basic ability to deal wiht pointer and
provenances, which lays the ground work for asm_const_ptr.

Note that `SymStatic` is not fully removed, a specialized is kept and
renamed as `SymThreadLocalStatic`, for `#[thread_local]` statics where CTFE
does not support naming. The `#[thread_local]` is unstable feature and it's
not clear if we want to support this in `sym`, but removal of it should be
a separate PR.
With the previous commit, now we can see there are some code duplication
for the handling of `GlobalAlloc` inside backends. Do some clean up to
unify them.
CTFE pointers created via type ID, `without_provenance` or pointers to const
ZSTs can now be codegenned with all 3 backends. These pointers are generated
in the same way as integers.
also add a test for cross-crate static initializers
…ef const after scheduling. That works only when a later phase emits a real diagnostics. For function item (associated fn), the lowering needs parent trait and self args
The backend now fully supports codegen of const pointers, remove the
block inside typeck behind a new feature gate. Tests are also added.
jhpratt added 3 commits July 24, 2026 21:09
…ove-file, r=ChrisDenton

Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`

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.

cc rust-lang#120426 @roblabla @the8472 @ChrisDenton @RalfJung

@rustbot label A-io T-libs O-Windows-7
…ssages, r=oli-obk

Avoid `#[target_features]`

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.

r? @oli-obk
Remove redundant `#[rustc_paren_sugar]` feature gate

It is already gated on `rustc_attrs`.

Alternatively we could update attribute parsing to optionally require multiple features, but that seems unnecessary.

r? @JonathanBrouwer
@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-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs 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
@jhpratt

jhpratt commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 4449ffc has been approved by jhpratt

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

⌛ Trying commit 4449ffc with merge 8269c48

To cancel the try build, run the command @bors try cancel.

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

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


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-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: "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\run-make\\rustdoc-show-coverage\\rmake.exe"
stdout: none
--- stderr -------------------------------
"D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "--target=x86_64-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 ===



"D:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2\\bin\\rustdoc.exe" "foo.rs" "-Zunstable-options" "--show-coverage" "-o" "-" "--target=x86_64-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 ===



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



=== STDERR ===



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



=== STDERR ===

---




thread 'main' (1728) panicked at D:\a\rust\rust\tests\run-make\rustdoc-show-coverage\rmake.rs:40:5:
assertion `left == right` failed: Expected "Generated output into \"doc/foo.txt\"\n", got "Generated output into \"doc\\\\foo.txt\"\n"
  left: "Generated output into \"doc\\\\foo.txt\"\n"
 right: "Generated output into \"doc/foo.txt\"\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

---- [run-make] tests\run-make\rustdoc-show-coverage stdout end ----

---
Currently active steps:
test::RunMake { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false }, target: x86_64-pc-windows-msvc } at src\bootstrap\src\core\build_steps\test.rs:1959
test::Compiletest { test_compiler: Compiler { stage: 2, host: x86_64-pc-windows-msvc, forced_compiler: false }, target: x86_64-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:59:22
make: *** [Makefile:115: ci-msvc-py] Error 1
  local time: Sat Jul 25 03:16:09 CUT 2026
  network time: Sat, 25 Jul 2026 03:16:09 GMT
##[error]Process completed with exit code 2.
##[group]Run echo "disk usage:"
echo "disk usage:"

@rust-bors

rust-bors Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4449ffc with merge cfe1b0f...

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

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

Successful merges:

 - #138618 (Support using const pointers in asm `const` operand)
 - #157962 (Function item should not be used as const arg)
 - #158404 (trait_solver: normalize next-gen region constraints)
 - #158709 (rustdoc: warn on improperly interleaved HTML/MD)
 - #159720 (document #[global_allocator] constraints)
 - #159732 (optimization: don't look for diagnostic/canonical items without rustc_attrs enabled)
 - #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)
 - #159411 ([rustdoc] Correctly handle output options with --show-coverage)
 - #159439 (Fix(lib/fs/win): Fall back on Win32 delete for `Dir::remove_file`)
 - #159809 (Avoid `#[target_features]`)
 - #159826 (Remove redundant `#[rustc_paren_sugar]` feature gate)
@jhpratt jhpratt closed this Jul 25, 2026
@jhpratt
jhpratt deleted the rollup-F4LwxHl branch July 25, 2026 03:50
@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 #159411, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

Auto build was cancelled due to unapproval. Cancelled workflows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.