Skip to content
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

Refocus unsafe code chapter on unsafe itself. #24640

Merged
merged 1 commit into from
Apr 22, 2015

Conversation

steveklabnik
Copy link
Member

#24631 is related, as it will delete this from the TOC, but I want to keep it here.

@rust-highfive
Copy link
Collaborator

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Apr 20, 2015

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 20, 2015

📌 Commit e7111e7 has been approved by brson

* Integer overflow

Rust cannot prevent all kinds of software problems. Buggy code can and will be
written in Rust. These things arne’t great, but they don’t qualify as `unsafe`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/arne/aren/

@huonw
Copy link
Member

huonw commented Apr 20, 2015

I assume you're intending to spread the content here into other sections?

I feel like having a focused sub-guide for unsafe code (i.e. some organisation beyond just a pile of chapters mixed in with the rest of Syntax and Semantics or whatever) is useful: it is hard enough to write unsafe code already, and scattering the documentation about gotchas and best practices (for unsafe, raw pointers, ...) doesn't seem like it will help.

Maybe the organisation could be using this section as a landing page that links to all the other related sections?

bors added a commit that referenced this pull request Apr 21, 2015
@bors
Copy link
Contributor

bors commented Apr 21, 2015

⌛ Testing commit e7111e7 with merge a3bb026...

@bors
Copy link
Contributor

bors commented Apr 21, 2015

💔 Test failed - auto-win-32-nopt-t

@steveklabnik
Copy link
Member Author

@bors: r=brson rollup

@bors
Copy link
Contributor

bors commented Apr 21, 2015

📌 Commit e7111e7 has been approved by brson

@steveklabnik
Copy link
Member Author

@huonw yes, a "Writing Safe Abstractions" chapter would be awesome in Effective Rust, but after moving most of what was in the unsafe guide to the unstable section, looking at this chapter, there's basically raw pointer stuff, and some comments about making unsafe things safer. In the new, semantics-oriented layout of these chapters, raw pointers deserve their own intro, and so does unsafe.

@steveklabnik
Copy link
Member Author

@bors: r=brson rollup

@bors
Copy link
Contributor

bors commented Apr 21, 2015

📌 Commit 9cc0af8 has been approved by brson

@huonw
Copy link
Member

huonw commented Apr 21, 2015

@steveklabnik as long as you have a plan! (That plan sounds good to me.)

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 21, 2015
rust-lang#24631 is related, as it will delete this from the TOC, but I want to keep it here.
@bors bors merged commit 9cc0af8 into rust-lang:master Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants