-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
WASI: forbid unsafe_op_in_unsafe_fn
for std::{os, sys}
#128432
WASI: forbid unsafe_op_in_unsafe_fn
for std::{os, sys}
#128432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, a few suggestions to match the others.
This comment has been minimized.
This comment has been minimized.
hmm @tgross35 it fails with an odd error for unix
I can do this only with changes that I did to unix, will it be fine if I don't do that and just enforce forbid in each wasi file besides mod.rs ? |
Yes, just enforcing this in the wasi files is fine. |
The behavior of modules with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few last style nits then looks good to me. Please squash into one commit.
library/std/src/os/wasi/ffi.rs
Outdated
//! | ||
//! [`std::ffi`]: crate::ffi | ||
#![stable(feature = "rust1", since = "1.0.0")] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in library/std/src/os/wasi/
looks like it got a line removed but the file is otherwise untouched. Assume this just happened because of fixups, could you reset these? Just look at the diff.
I think a space between inner docs and inner attributes is common anyway (@workingjubilee could certainly say for sure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Common, not required? Certainly better to not diff the file if nothing actually changed otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking more about library/std/src/os/wasip2/mod.rs
that both had an update and removed the line. But yeah, I'm mildly surprised rustfmt doesn't do something here.
8a7a495
to
dcd6fb6
Compare
dcd6fb6
to
8a61674
Compare
@rustbot ready |
@bors r+ |
std::{os, sys}
std::{os, sys}
unsafe_op_in_unsafe_fn
for std::{os, sys}
Actually, this didn't get tested yet. Might as well verify before it gets picked up. @bors r- |
@bors try |
…_unsafe, r=<try> WASI: foirbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}` Part of rust-lang#127747 for WASI try-job: test-various
unsafe_op_in_unsafe_fn
for std::{os, sys}
unsafe_op_in_unsafe_fn
for std::{os, sys}
☀️ Try build successful - checks-actions |
@bors r+ |
…it_unsafe, r=tgross35 WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}` Part of rust-lang#127747 for WASI try-job: test-various
Rollup of 7 pull requests Successful merges: - rust-lang#128432 (WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}`) - rust-lang#128627 (Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms.) - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation) - rust-lang#129257 (Allow rust staticlib to work with MSVC's /WHOLEARCHIVE) - rust-lang#129264 (Update `library/Cargo.toml` in weekly job) - rust-lang#129284 (rustdoc: animate the `:target` highlight) - rust-lang#129332 (Avoid extra `cast()`s after `CStr::as_ptr()`) r? `@ghost` `@rustbot` modify labels: rollup
…it_unsafe, r=tgross35 WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}` Part of rust-lang#127747 for WASI try-job: test-various
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128432 (WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}`) - rust-lang#129373 (Add missing module flags for CFI and KCFI sanitizers) - rust-lang#129374 (Use `assert_unsafe_precondition!` in `AsciiChar::digit_unchecked`) - rust-lang#129376 (Change `assert_unsafe_precondition` docs to refer to `check_language_ub`) - rust-lang#129382 (Add `const_cell_into_inner` to `OnceCell`) - rust-lang#129387 (Advise against removing the remaining Python scripts from `tests/run-make`) - rust-lang#129388 (Do not rely on names to find lifetimes.) - rust-lang#129395 (Pretty-print own args of existential projections (dyn-Trait w/ GAT constraints)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128432 - g0djan:godjan/wasi_prohibit_implicit_unsafe, r=tgross35 WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}` Part of rust-lang#127747 for WASI try-job: test-various
Part of #127747 for WASI
try-job: test-various