-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Document CStr::as_ptr
dangers.
#34356
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
Conversation
dbd543e
to
9ed36d7
Compare
Nice explanation, I approve! Thanks! @bors: r+ rollup |
📌 Commit 9ed36d7 has been approved by |
Oups, didn't know that |
Ah right, didn't pay attention. @bors: r+ rollup |
📌 Commit 677aa47 has been approved by |
⌛ Testing commit 677aa47 with merge 33aa3ed... |
Document `CStr::as_ptr` dangers. r? @steveklabnik Hi! I've tried to document `CString::new("hello").unwrap().as_ptr()` footgun. Related [RFC] and the original [discussion]. [RFC]: rust-lang/rfcs#1642 [discussion]: https://users.rust-lang.org/t/you-should-stop-telling-people-that-safe-rust-is-always-safe/6094
⛄ The build was interrupted to prioritize another pull request. |
Document `CStr::as_ptr` dangers. r? @steveklabnik Hi! I've tried to document `CString::new("hello").unwrap().as_ptr()` footgun. Related [RFC] and the original [discussion]. [RFC]: rust-lang/rfcs#1642 [discussion]: https://users.rust-lang.org/t/you-should-stop-telling-people-that-safe-rust-is-always-safe/6094
r? @steveklabnik
Hi! I've tried to document
CString::new("hello").unwrap().as_ptr()
footgun. Related RFC and the original discussion.