-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Docs: clarify that certain intrinsics are not unsafe #86308
Conversation
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
Maybe add a comment in |
Btw: #86327 will fix the rustdoc issue which made these intrinsics' signatures appear unsafe to call in the libcore/libstd docs. |
Great to hear that the rustdoc bug is fixed. I still think that this PR would be useful, since the idea of any safe function declared inside an extern block is surprising, and users used to the normal semantics of extern blocks could just as easily assume that the lack of a visible |
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.
Looks reasonable to me! It's a bit unfortunate that we have to write a lot of the same comments but it should be fine for now.
r? @JohnTitor @bors r+ rollup |
📌 Commit 16168dd has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#84029 (add `track_path::path` fn for usage in `proc_macro`s) - rust-lang#85001 (Merge `sys_common::bytestring` back into `os_str_bytes`) - rust-lang#86308 (Docs: clarify that certain intrinsics are not unsafe) - rust-lang#86796 (Add a regression test for issue-70703) - rust-lang#86803 (Remove & from Command::args calls in documentation) - rust-lang#86807 (Fix double import in wasm thread ) - rust-lang#86813 (Add a help message to `unused_doc_comments` lint) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
As determined by the hardcoded list at
rust/compiler/rustc_typeck/src/check/intrinsic.rs
Lines 59 to 92 in 003b8ea