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

document what unsafety means #9258

Merged
merged 1 commit into from
Sep 18, 2013
Merged

document what unsafety means #9258

merged 1 commit into from
Sep 18, 2013

Conversation

thestinger
Copy link
Contributor

Closes #9144

@thestinger thestinger closed this Sep 17, 2013
@thestinger thestinger reopened this Sep 17, 2013

This is a list of behaviour `unsafe` blocks/functions *must prevent*. These issues cannot be caused
by safe code, if all interfaces using `unsafe` code internally are correct.

Copy link
Member

Choose a reason for hiding this comment

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

This reads a bit passive in my opinion. These two sentences should be reworded to make the warning about unsafeness and the rules to follow more clear:


This is a list of behavior that must never occur in a rust program. You can cause them with unsafe blocks/functions, so while writing those you have to take care to prevent them. All safe rust code is build on the trust that all interfaces using unsafe code internally are correct, and only if you uphold that trust do you get the guarantee that safe code will never cause those issues.

bors added a commit that referenced this pull request Sep 18, 2013
@bors bors closed this Sep 18, 2013
@bors bors merged commit e12c3bf into rust-lang:master Sep 18, 2013
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 29, 2022
Add [`unused_peekable`] lint

changelog: Add [`unused_peekable`] lint
closes: rust-lang#854
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.

Document what unsafety means in rust
3 participants