Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rollup of 8 pull requests #146141

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

Closed
tgross35 wants to merge 25 commits into rust-lang:master from tgross35:rollup-vx6hx6n
Closed

Conversation

Copy link
Contributor

@tgross35 tgross35 commented Sep 3, 2025
edited by rustbot
Loading

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Kmeakin and others added 25 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.
this uses some # directives to make sure the code works on x86_64, and does not produce errors on other platforms
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.
...-check-block, r=rcvalle
unstable book: in a sanitizer example, check the code
Use some `#` directives to make sure the code checks on x86_64, and does not produce errors on other platforms. This example still used an older version of `#[naked]`, and because the snippet was ignored that was missed before.
I'm not sure when this gets built on CI exactly, so it might be worthwhile to try and build it for a non-x86_64 architecture to make sure that works. I'm not sure how to verify locally that e.g. on aarch64 this code works without errors/warnings.
try-job: aarch64-apple
... 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 
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool O-wasi Operating system: Wasi, Webassembly System Interface PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 3, 2025
@rustbot rustbot added 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. labels Sep 3, 2025
Copy link
Contributor Author

tgross35 commented Sep 3, 2025

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Sep 3, 2025
Copy link
Collaborator

bors commented Sep 3, 2025

📌 Commit ab3eecf has been approved by tgross35

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
Copy link
Collaborator

bors commented Sep 3, 2025

⌛ Testing commit ab3eecf with merge 08780cf...

bors added a commit that referenced this pull request Sep 3, 2025
Rollup of 8 pull requests
Successful merges:
 - #139113 (unstable book: in a sanitizer example, check the code)
 - #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 )
r? `@ghost`
`@rustbot` modify labels: rollup
Copy link
Contributor Author

tgross35 commented Sep 3, 2025
edited
Loading

I was going to retry this but it looks like the job still going (currently [3608/3789] Building CXX object). Must have gotten stuck earlier than unstuck?

May as well wait it out, looks like about an hour left from this point based on the previous run

Copy link
Member

Kobzol commented Sep 3, 2025

Cancelled the job. The LLVM builds have been flaky recently...

tgross35 reacted with thumbs up emoji

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
Copy link
Member

Kobzol commented Sep 3, 2025

@bors retry

@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
Copy link
Collaborator

bors commented Sep 3, 2025

⌛ Testing commit ab3eecf with merge 6267c26...

bors added a commit that referenced this pull request Sep 3, 2025
Rollup of 8 pull requests
Successful merges:
 - #139113 (unstable book: in a sanitizer example, check the code)
 - #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 )
r? `@ghost`
`@rustbot` modify labels: rollup
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
---- D:\a\rust\rust\src/doc/unstable-book\src\compiler-flags\sanitizer.md - ControlFlowIntegrity::Example_1__Redirecting_control_flow_using_an_indirect_branch_call_to_an_invalid_destination (line 247) stdout ----
Test executable failed (exit code: 101).
stdout:
The answer is: 12
With CFI enabled, you should not see the next answer
stderr:
thread 'main' (9148) panicked at D:\a\rust\rust\src/doc/unstable-book\src\compiler-flags\sanitizer.md:31:5:
attempt to add with overflow
---
 D:\a\rust\rust\src/doc/unstable-book\src\compiler-flags\sanitizer.md - ControlFlowIntegrity::Example_1__Redirecting_control_flow_using_an_indirect_branch_call_to_an_invalid_destination (line 247)
test result: FAILED. 7 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.75s
Command `D:\a\rust\rust\build\bootstrap\debug\rustdoc -Wrustdoc::invalid_codeblock_attributes -Dwarnings -Znormalize-docs -Z unstable-options --test D:\a\rust\rust\src/doc/unstable-book\src\compiler-flags\sanitizer.md --test-args ` failed with exit code 101
Created at: src\bootstrap\src\core\builder\mod.rs:1666:23
Executed at: src\bootstrap\src\core\build_steps\test.rs:2658:13
Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `test --stage 2 --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest`
Build completed unsuccessfully in 1:47:34
make: *** [Makefile:114: ci-msvc-ps1] Error 1
 local time: Wed Sep 3 10:07:58 CUT 2025
 network time: 2025年9月03日 10:07:59 GMT
##[error]Process completed with exit code 2.
Post job cleanup.
[command]"C:\Program Files\Git\bin\git.exe" version

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
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool O-wasi Operating system: Wasi, Webassembly System Interface PG-exploit-mitigations Project group: Exploit mitigations 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.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /