-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Rollup of 9 pull requests #150901
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
Closed
Rollup of 9 pull requests #150901
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The documentation of `SipHasher` previously linked to a page about SipHash on https://131002.net, a domain registered to Jean-Philippe Aumasson, one of the co-authors of the original SipHash paper (alongside Daniel J Bernstein). That domain now redirects to another of Mr Aumasson's domains, https://www.aumasson.jp, but which does not host a similar page dedicated to SipHash. Instead, his site links to a GitHub repository containing a C implementation together with links to the original research paper. Mr Bernstein's own site, https://cr.yp.to, only hosts a copy of the research paper. Therefore the GitHub repository appears to be the most official and complete reference to which we can link.
Signed-off-by: tison <wander4096@gmail.com> Co-Authored-By: Orson Peters <orsonpeters@gmail.com> Signed-off-by: tison <wander4096@gmail.com>
std supports redirecting stdio file descriptors.
This patch removes one call to `std::mem::take` to save two `memcpy`s: `JsonRenderer::index` can be quite large as noted rust-lang#142335. `self.index` can be passed directly to `types::Crate`. This removal makes `self` immutable. The private `serialize_and_write` method is moved as a function: the `self` argument is replaced by `sess: &Session`. This `&Session` was fetched earlier in `after_krate` in all cases. This change allows to call `serialize_and_write` after `output_crate` is created, without having a conflict around the move of `self`: the borrow checker is now happy.
When PR rust-lang#147572 switched WASI to use Unix-style filesystem APIs, the open_to_and_set_permissions function for WASI was implemented to call OpenOptions::new().open() without setting any access mode flags. This causes std::fs::copy to fail with the error: "must specify at least one of read, write, or append access" The fix is to explicitly set .write(true), .create(true), and .truncate(true) on the OpenOptions, matching the behavior of the non-WASI Unix implementation but without the permission handling that WASI doesn't support. Minimal reproduction: fn main() { std::fs::write("/src.txt", b"test").unwrap(); match std::fs::copy("/src.txt", "/dst.txt") { Ok(_) => println!("PASS: fs::copy works!"), Err(e) => println!("FAIL: {}", e), } } # Compile and run: rustc +nightly --target wasm32-wasip2 test.rs -o test.wasm wasmtime -S cli --dir . test.wasm # Before fix: FAIL: must specify at least one of read, write, or append access # After fix: PASS: fs::copy works! Note: The existing test library/std/src/fs/tests.rs::copy_file_ok would have caught this regression if the std test suite ran on WASI targets. Currently std tests don't compile for wasm32-wasip2 due to Unix-specific test code in library/std/src/sys/fd/unix/tests.rs. Fixes the regression introduced in nightly-2025-12-10.
…oss35 Implement partial_sort_unstable for slice This refers to rust-lang#149046.
adding Ordering enum to minicore.rs, importing minicore in "tests/assembly-llvm/rust-abi-arg-attr.rs" test file this adds the `Ordering` enum to `minicore.rs`. consequently, this updates `tests/assembly-llvm/rust-abi-arg-attr.rs` to import `minicore` directly. previously, this test file contained traits like `Copy` `Clone` `PointeeSized`, which were giving a duplicate lang item error, so replace those by importing `minicore` completely.
…Jung Unix implementation for stdio set/take/replace Tracking issue: rust-lang#150667 ACP: rust-lang/libs-team#500
mGCA: Support array expression as direct const arguments tracking issue: rust-lang#132980 resolve: rust-lang#150612 Support array expression as direct const arguments (e. g. [1, 2, N]) in min_generic_const_args. todo: * [x] Rebase another mGCA PR * [x] Add more test case * [x] Modify clippy code
Fix broken documentation links to SipHash The documentation of `SipHasher` previously linked to a page about SipHash on https://131002.net, a domain registered to Jean-Philippe Aumasson, one of the co-authors of the original SipHash paper (alongside Daniel J Bernstein). That domain now redirects to another of Mr Aumasson's domains, https://www.aumasson.jp, but which does not host a similar page dedicated to SipHash. Instead, his site links to a GitHub repository containing a C implementation together with links to the original research paper. Mr Bernstein's own site, https://cr.yp.to, only hosts a copy of the research paper. Therefore the GitHub repository appears to be the most official and complete reference to which we can link. Fixes rust-lang#150806 r? reddevilmidzy
…GuillaumeGomez rustdoc_json: Remove one call to `std::mem::take` in `after_krate` This patch removes one call to `std::mem::take` to save two `memcpy`s: `JsonRenderer::index` can be quite large as noted rust-lang#142335. `self.index` can be passed directly to `types::Crate`. This removal makes `self` immutable. The private `serialize_and_write` method is moved as a function: the `self` argument is replaced by `sess: &Session`. This `&Session` was fetched earlier in `after_krate` in all cases. This change allows to call `serialize_and_write` after `output_crate` is created, without having a conflict around the move of `self`: the borrow checker is now happy. I wasn't able to measure the performance impact though because I don't know how to modify `rustc-perf` as [@nnethercote did](rust-lang#142335 (comment)) (sorry). --- Follow up of rust-lang#142335. r? @nnethercote
Emit error instead of delayed bug when meeting mismatch type for const tuple And rename some tests Fixes rust-lang#150841 r? @BoxyUwU
Mention that `rustc_codegen_gcc` is a subtree in `rustc-dev-guide` Was asked on [zulip](https://rust-lang.zulipchat.com/#narrow/channel/386786-rustc-codegen-gcc/topic/Subtree.20handling/with/564354089). r? @RalfJung
Fix std::fs::copy on WASI by setting proper OpenOptions flags When PR rust-lang#147572 switched WASI to use Unix-style filesystem APIs, the open_to_and_set_permissions function for WASI was implemented to call OpenOptions::new().open() without setting any access mode flags. This causes std::fs::copy to fail with the error: "must specify at least one of read, write, or append access" The fix is to explicitly set .write(true), .create(true), and .truncate(true) on the OpenOptions, matching the behavior of the non-WASI Unix implementation but without the permission handling that WASI doesn't support. Minimal reproduction: ```rs fn main() { std::fs::write("/src.txt", b"test").unwrap(); match std::fs::copy("/src.txt", "/dst.txt") { Ok(_) => println!("PASS: fs::copy works!"), Err(e) => println!("FAIL: {}", e), } } ``` # Compile and run: rustc +nightly --target wasm32-wasip2 test.rs -o test.wasm wasmtime -S cli --dir . test.wasm # Before fix: FAIL: must specify at least one of read, write, or append access # After fix: PASS: fs::copy works! Note: The existing test library/std/src/fs/tests.rs::copy_file_ok would have caught this regression if the std test suite ran on WASI targets. Currently std tests don't compile for wasm32-wasip2 due to Unix-specific test code in library/std/src/sys/fd/unix/tests.rs. Fixes the regression introduced in nightly-2025-12-10. r? @alexcrichton
Contributor
Author
|
Whoops, looks like there's already #150900 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-rustc-dev-guide
Area: rustc-dev-guide
A-rustdoc-json
Area: Rustdoc JSON backend
A-test-infra-minicore
Area: `minicore` test auxiliary and `//@ add-core-stubs`
O-unix
Operating system: Unix-like
rollup
A PR which is a rollup
T-clippy
Relevant to the Clippy team.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
std::mem::takeinafter_krate#150867 (rustdoc_json: Remove one call tostd::mem::takeinafter_krate)rustc_codegen_gccis a subtree inrustc-dev-guide#150876 (Mention thatrustc_codegen_gccis a subtree inrustc-dev-guide)r? @ghost
Create a similar rollup