Skip to content

Conversation

Zalathar
Copy link
Contributor

@Zalathar Zalathar commented Sep 3, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kmeakin and others added 27 commits August 15, 2025 01:29
To make changes in table size obvious from git diffs
Include the sizes of the `to_lowercase` and `to_uppercase` tables in the
total size calculations.
The `merge_ranges` function was very complicated and hard to understand.
Forunately, we can use `slice::chunk_by` to achieve the same thing.
Rewrite `generate_tests` to be more idiomatic.
reading through the editorconfig spec, using `!` to negate
an entire glob is simply not a feature.

you can use `!` to negate a charachter class, but that's not
what was going on here.
For `wasm32-wasip2`-and-beyond this tool is required, so in case it's
disabled in `config.toml` add a sanity-check that it's present in the
environment.
This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
The `loongarch64-unknown-none` target is a bare-metal target with
hardware floating-point support and should not enable SIMD extensions
by default. However, LLVM's LoongArch64 backend enables LSX implicitly,
inadvertently activating SIMD instructions for this target. This patch
explicitly disable LSX feature to prevent unintended SIMD usage.
In writing up the reference for frontmatter, I realized that we probably
shouldn't be accepting Unicode Line Ending characters between the code
fence and infostring or trailing after the infostring or a code fence.

In digging into the unicode specification we use for Whitespace, it
divides it up into categories, so I'm deferring to what it says for
horizontal whitespace for what should be used within a line.

Note, I am leaving out support for Unicde Default Ignorable characters.
I figure that can be discussed outside of this change within the
reference and tracking issue.
a more general version of rust-lang#146080.

after a bit of hacking in [`fluent.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_fluent_macro/src/fluent.rs), i discovered that i'm not the only one that is bad at following guidelines 😅. this pr lowercases the first letter of all the error messages in the codebase.

(i did not change things that are traditionally uppercased such as _MIR_, _ABI_ or _C_)

i think it's reasonable to run a `@bors try` so all the test suite is checked, as i cannot run some of the tests on my machine. i double checked (and replaced manually) all the old error messages, but better be safe than sorry.

in the future i will try to add a check in `x test tidy` that errors if an error message starts with an uppercase letter.
This upgrades the Rust CI from v6.16-rc1 plus a temporary commit for
the >= 1.91 target spec [1] to v6.17-rc3 with two commits pending to
be merged upstream -- one for the same target spec format change [1]
and another for the `file_as_c_str` change [2].

Link: rust-lang#144443 [1]
Link: rust-lang#145928 [2]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
… r=tgross35

Constify conversion traits (part 1)

This is the first part of rust-lang#144289 being split into smaller pieces. It adds/moves constness of several traits under the `const_convert` feature:

* `From`
* `Into`
* `TryFrom`
* `TryInto`
* `FromStr`
* `AsRef`
* `AsMut`
* `Borrow`
* `BorrowMut`
* `Deref`
* `DerefMut`

There are a few methods that are intrinsically tied to these traits which I've included in the feature. Particularly, those which are wrappers over `AsRef`:

* `ByteStr::new` (unstable under `bstr` feature)
* `OsStr::new`
* `Path::new`

Those which directly use `Into`:

* `Result::into_ok`
* `Result::into_err`

And those which use `Deref` and `DerefMut`:

* `Pin::as_ref`
* `Pin::as_mut`
* `Pin::as_deref_mut`
* `Option::as_deref`
* `Option::as_deref_mut`
* `Result::as_deref`
* `Result::as_deref_mut`

(note: the `Option` and `Result` methods were suggested by `@npmccallum` initially as rust-lang#146101)

The parts which are missing from this PR are:

* Anything that involves heap-allocated types
* Making any method const than the ones listed above
* Anything that could rely on the above, *or* could rely on system-specific code for `OsStr` or `Path` (note: this mostly makes these methods useless since `str` doesn't implement `AsRef<OsStr>` yet, but it's better to track the method for now and add impls later, IMHO)

r? `@tgross35` (who mostly already reviewed this)
…, r=joshtriplett,tgross35

unicode-table-generator refactors

Split off from rust-lang#145219
…uillaumeGomez

editorconfig: don't use nonexistent syntax

reading through the editorconfig spec, using `!` to negate an entire glob is simply not a feature.

you can use `!` to negate a charachter class, but that's not what was going on here.
…ss35

std: Start supporting WASIp2 natively

This commit is the start of an effort to support WASIp2 natively in the
standard library. Before this commit the `wasm32-wasip2` target behaved
exactly like `wasm32-wasip1` target by importing APIs from the core wasm
module `wasi_snapshot_preview1`. These APIs are satisfied by the
`wasm-component-ld` target by using an [adapter] which implements WASIp1
in terms of WASIp2. This adapter comes at a cost, however, in terms of
runtime indirection and instantiation cost, so ideally the adapter would
be removed entirely. The purpose of this adapter was to provide a
smoother on-ramp from WASIp1 to WASIp2 when it was originally created.

The `wasm32-wasip2` target has been around for long enough now that it's
much more established. Additionally the only thing historically blocking
using WASIp2 directly was implementation effort. Work is now underway to
migrate wasi-libc itself to using WASIp2 directly and now seems as good
a time as any to migrate the Rust standard library too.

Implementation-wise the milestones here are:

* The `wasm32-wasip2` target now also depends on the `wasi` crate at
  version 0.14.* in addition to the preexisting dependency of 0.11.*.
  The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs.
* Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to
  `wasip1` where appropriate. For example `std::sys::pal::wasi` is now
  called `std::sys::pal::wasip1`.
* More platform-specific WASI modules are now split between WASIp1 and
  WASIp2. For example getting the current time, randomness, and
  process arguments now use WASIp2 APIs directly instead of using WASIp1
  APIs that require an adapter.

It's worth pointing out that this PR does not migrate the entire
standard library away from using WASIp1 APIs on the `wasm32-wasip2`
target. Everything related to file descriptors and filesystem APIs is
still using WASIp1. Migrating that is left for a future PR. In the
meantime the goal of this change is to lay the groundwork necessary for
migrating in the future. Eventually the goal is to drop the `wasi`
0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1`
target will continue to retain this dependency).

[adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
…rcote

resolve: Avoid a regression from splitting prelude into two scopes

Fixes rust-lang#145575.
Explicity disable LSX feature for `loongarch64-unknown-none` target

The `loongarch64-unknown-none` target is a bare-metal target with hardware floating-point support and should not enable SIMD extensions by default. However, LLVM's LoongArch64 backend enables LSX implicitly, inadvertently activating SIMD instructions for this target. This patch explicitly disable LSX feature to prevent unintended SIMD usage.
fix(lexer): Only allow horizontal whitespace in frontmatter

In writing up the reference for frontmatter, I realized that we probably
shouldn't be accepting Unicode Line Ending characters between the code
fence and infostring or trailing after the infostring or a code fence.

In digging into the unicode specification we use for Whitespace, it
divides it up into categories, so I'm deferring to what it says for
horizontal whitespace for what should be used within a line.

Note, I am leaving out support for Unicode Default Ignorable characters.
I figure that can be discussed outside of this change within the
reference and tracking issue.

Fixes rust-lang#145971

Frontmatter tracking issue: rust-lang#136889
CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commits

This upgrades the Rust CI from v6.16-rc1 plus a temporary commit for the >= 1.91 target spec [1] to v6.17-rc3 with two commits pending to be merged upstream -- one for the same target spec format change [1] and another for the `file_as_c_str` change [2].

Link: rust-lang#144443 [1]
Link: rust-lang#145928 [2]

r? `@lqd` `@Kobzol`
try-job: x86_64-rust-for-linux
`@rustbot` label A-rust-for-linux
`@bors` try
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself labels Sep 3, 2025
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-wasi Operating system: Wasi, Webassembly System Interface 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-infra Relevant to the infrastructure 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. rollup A PR which is a rollup labels Sep 3, 2025
@Zalathar
Copy link
Contributor Author

Zalathar commented Sep 3, 2025

Rollup of everything not in #146153. Quasi-successor to #146141.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Sep 3, 2025

📌 Commit 546c8b2 has been approved by Zalathar

It is now in the queue for this repository.

@bors bors 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 Sep 3, 2025
bors added a commit that referenced this pull request Sep 3, 2025
Rollup of 9 pull requests

Successful merges:

 - #145279 (Constify conversion traits (part 1))
 - #145414 (unicode-table-generator refactors)
 - #145823 (editorconfig: don't use nonexistent syntax)
 - #145944 (std: Start supporting WASIp2 natively )
 - #145961 (resolve: Avoid a regression from splitting prelude into two scopes)
 - #146032 (Explicity disable LSX feature for `loongarch64-unknown-none` target)
 - #146106 (fix(lexer): Only allow horizontal whitespace in frontmatter )
 - #146112 (don't uppercase error messages)
 - #146154 (CI: rfl: move job forward to Linux v6.17-rc3 plus 2 commits)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Sep 3, 2025

⌛ Testing commit 546c8b2 with merge 0cae2f9...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests\ui\linkage-attr\raw-dylib\windows\invalid-dlltool.rs stdout ----
Saved the actual stderr to `D:\a\rust\rust\build\x86_64-pc-windows-gnu\test\ui\linkage-attr\raw-dylib\windows\invalid-dlltool\invalid-dlltool.stderr`
diff of stderr:

1 error: error calling dlltool 'does_not_exist.exe': program not found
2 
3 error: aborting due to 1 previous error
+ 
4 


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args linkage-attr\raw-dylib\windows\invalid-dlltool.rs`

error: 1 errors occurred comparing output.
status: exit code: 1
command: PATH="D:\a\rust\rust\build\x86_64-pc-windows-gnu\stage2\bin;D:\a\rust\rust\build\x86_64-pc-windows-gnu\bootstrap-tools\x86_64-pc-windows-gnu\release\deps;D:\a\rust\rust\ninja;D:\a\rust\rust\mingw64\bin;C:\msys64\usr\bin;D:\a\rust\rust\sccache;C:\Program Files\MongoDB\Server\7.0\bin;C:\vcpkg;C:\tools\zstd;C:\hostedtoolcache\windows\stack\3.7.1\x64;C:\cabal\bin;C:\ghcup\bin;C:\mingw64\bin;C:\Program Files\dotnet;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\R\R-4.4.2\bin\x64;C:\SeleniumWebDrivers\GeckoDriver;C:\SeleniumWebDrivers\EdgeDriver;C:\SeleniumWebDrivers\ChromeDriver;C:\Program Files (x86)\sbt\bin;C:\Program Files (x86)\GitHub CLI;C:\Program Files\Git\bin;C:\Program Files (x86)\pipx_bin;C:\npm\prefix;C:\hostedtoolcache\windows\go\1.24.6\x64\bin;C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts;C:\hostedtoolcache\windows\Python\3.9.13\x64;C:\hostedtoolcache\windows\Ruby\3.3.9\x64\bin;C:\Program Files\OpenSSL\bin;C:\tools\kotlinc\bin;C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\17.0.16-8\x64\bin;C:\Program Files\ImageMagick-7.1.2-Q16-HDRI;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\ProgramData\kind;C:\ProgramData\Chocolatey\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files (x86)\WiX Toolset v3.14\bin;C:\Program Files\Microsoft SQL Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\160\DTS\Binn;C:\ProgramData\chocolatey\lib\pulumi\tools\Pulumi\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.11\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\GitHub CLI;C:\tools\php;C:\Program Files (x86)\sbt\bin;C:\Program Files\Amazon\AWSCLIV2;C:\Program Files\Amazon\SessionManagerPlugin\bin;C:\Program Files\Amazon\AWSSAMCLI\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\mongosh;C:\Program Files\LLVM\bin;C:\Program Files (x86)\LLVM\bin;C:\Users\runneradmin\.dotnet\tools;C:\Users\runneradmin\.cargo\bin;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2\\bin\\rustc.exe" "D:\\a\\rust\\rust\\tests\\ui\\linkage-attr\\raw-dylib\\windows\\invalid-dlltool.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=C:\\Users\\runneradmin\\.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=D:\\a\\rust\\rust\\vendor" "--sysroot" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage2" "--target=x86_64-pc-windows-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\test\\ui\\linkage-attr\\raw-dylib\\windows\\invalid-dlltool" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\native\\rust-test-helpers" "--crate-type" "lib" "--emit" "link" "-Cdlltool=does_not_exist.exe"
stdout: none
--- stderr -------------------------------
error: error calling dlltool 'does_not_exist.exe': program not found

error: aborting due to 1 previous error
------------------------------------------

---- [ui] tests\ui\linkage-attr\raw-dylib\windows\invalid-dlltool.rs stdout end ----
---

Some tests failed in compiletest suite=ui mode=ui host=x86_64-pc-windows-gnu target=x86_64-pc-windows-gnu
Bootstrap failed while executing `test --stage 2 --skip=compiler --skip=src`
Build completed unsuccessfully in 1:43:21
make: *** [Makefile:123: ci-mingw-x] Error 1
  local time: Wed Sep  3 12:58:59 CUT 2025
  network time: Wed, 03 Sep 2025 12:59:00 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

@bors
Copy link
Collaborator

bors commented Sep 3, 2025

💔 Test failed - checks-actions

@bors bors 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 Sep 3, 2025
@Zalathar Zalathar closed this Sep 3, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2025
@Zalathar Zalathar deleted the rollup-0w8r7g6 branch September 3, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-wasi Operating system: Wasi, Webassembly System Interface 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-infra Relevant to the infrastructure 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.