-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Minor: note how Any is an unsafe trait in SAFETY comments #67722
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup |
📌 Commit 98b58940150f40563a4ee7945678ecf9ab10fd78 has been approved by |
@bors r- let's avoid documenting any as unsafe until we actually do that - currently, the FCP on the relevant PR has some dissent |
Ha, bit of a brainfart on my part. I think I was thinking "it's morally unsafe even if not actually marked as such"
…On December 30, 2019 7:55:09 AM EST, Mark Rousskov ***@***.***> wrote:
@bors r- let's avoid documenting any as unsafe until we actually do
that - currently, the FCP on the relevant PR has some dissent
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#67722 (comment)
|
Ping from Triage: any update @petertodd? |
This makes sense with the current wording if #67562 is merged, which I'm in favor of. But if not maybe reword to "because Any is unsafe to implement"? |
Marking this as blocked on #67562 |
Makes sense, thanks! |
The PR that this was blocked on has been closed so i'm not sure what happens to this one |
The comments here should be updated to indicate that the operations are safe because the blanket impl for I believe that would satisfy the safety obligation for these methods. It may also be worth linking to #67562 in the SAFETY comment for additional context. |
I'm going to also steal the review here r? @Mark-Simulacrum, but if someone feels they would want to take a look too feel free to add yourself. |
AFAICT, this is still waiting on author -- see #67722 (comment) for what needs to be done. |
98b5894
to
f722964
Compare
@Mark-Simulacrum Revised comments as per #67562 |
@bors r+ Thanks! |
📌 Commit f722964 has been approved by |
… r=Mark-Simulacrum Minor: note how Any is an unsafe trait in SAFETY comments Motivation: helpful to people like myself reading the standard library source to better understand how to use Any, especially if we do go ahead with rust-lang#67562 and make it an unsafe trait.
Rollup of 7 pull requests Successful merges: - #67722 (Minor: note how Any is an unsafe trait in SAFETY comments) - #68586 (Make conflicting_repr_hints a deny-by-default c-future-compat lint) - #68598 (Fix null synthetic_implementors error) - #68603 (Changelog: Demonstrate final build-override syntax) - #68609 (Set lld flavor for MSVC to link.exe) - #68611 (Correct ICE caused by macros generating invalid spans.) - #68627 (Document that write_all will not call write if given an empty buffer) Failed merges: r? @ghost
Motivation: helpful to people like myself reading the standard library source to better understand how to use Any, especially if we do go ahead with #67562 and make it an unsafe trait.