-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 11 pull requests #75476
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
Merged
Merged
Rollup of 11 pull requests #75476
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
All of these were review comments in rust-lang#74621 that I first fixed in that PR, but later accidentally overwrote by a force push.
Added in b761538, it started out already unused.
Added in rust-lang#35174, this was already unused (and new uses have not been introduced since then).
Added in rust-lang#35174, this was already unused (and new uses have not been introduced since then).
Also introduced in rust-lang#35174, and immediately unused.
Also unused since introduction in rust-lang#35174
…rAus Fix wasi::fs::OpenOptions to imply write when append is on This PR fixes a bug in `OpenOptions` of `wasi` platform that it currently doesn't imply write mode when only `append` is enabled. As explained in the [doc of OpenOptions#append](https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.append), calling `.append(true)` should imply `.write(true)` as well. ## Reproduce Given below simple Rust program: ```rust use std::fs::OpenOptions; use std::io::Write; fn main() { let mut file = OpenOptions::new() .write(true) .create(true) .open("foo.txt") .unwrap(); writeln!(file, "abc").unwrap(); } ``` it can successfully compiled into wasm and execute by `wasmtime` runtime: ```sh $ rustc --target wasm32-wasi write.rs $ ~/wasmtime/target/debug/wasmtime run --dir=. write.wasm $ cat foo.txt abc ``` However when I change `.write(true)` to `.append(true)`, it fails to execute by the error "Capabilities insufficient": ```sh $ ~/wasmtime/target/debug/wasmtime run --dir=. append.wasm thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 76, kind: Other, message: "Capabilities insufficient" }', append.rs:10:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Error: failed to run main module `append.wasm` ... ``` This is because of lacking "rights" on the opened file: ```sh $ RUST_LOG=trace ~/wasmtime/target/debug/wasmtime run --dir=. append.wasm 2>&1 | grep validate_rights TRACE wasi_common::entry > | validate_rights failed: required rights = HandleRights { base: fd_write (0x40), inheriting: empty (0x0) }; actual rights = HandleRights { base: fd_seek|fd_fdstat_set_flags|fd_sync|fd_tell|fd_advise|fd_filestat_set_times|poll_fd_readwrite (0x88000bc), inheriting: empty (0x0) } ```
…gs, r=varkor Fix some Clippy warnings in librustc_serialize
Fix suggestion to use lifetime in type and in assoc const _Do not merge until rust-lang#75363 has landed, as it has the test case for this._ * Account for associated types * Associated `const`s can't have generics (fix rust-lang#74264) * Do not suggest duplicate lifetimes and suggest `for<'a>` more (fix rust-lang#72404)
…rAus Fix minor things in the `f32` primitive docs All of these were review comments in rust-lang#74621 that I first fixed in that PR, but later accidentally overwrote by a force push. Thanks @the8472 for noticing. r? @KodrAus
…iser add regression test for rust-lang#74739 (mir const-prop bug) Fixes rust-lang#74739
…kfire Clean up E0751 explanation r? @Dylan-DPC cc @pickfire
Use explicit path link in place for doc in time r? @jyn514 More worth for your time. :P
…=KodrAus Move to intra doc links whenever possible within std/src/lib.rs Helps with rust-lang#75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc There are some things like ```rust `//! [`Option<T>`]: option::Option` ``` that will either be fixed in the future or have open issues about them.
… r=KodrAus Switch to intra-doc links in `std/io/mod.rs` Part of rust-lang#75080.
Flip order of const & type Fix swapped order of consts & types in error message introduced in rust-lang#74953 r? @varkor cc @lcnr
📌 Commit 76ac5d6 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
f32
primitive docs #75400 (Fix minor things in thef32
primitive docs)std/io/mod.rs
#75469 (Switch to intra-doc links instd/io/mod.rs
)Failed merges:
r? @ghost