Skip to content

Document what unsafety means in rust #9144

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

Closed
brson opened this issue Sep 12, 2013 · 2 comments · Fixed by #9258
Closed

Document what unsafety means in rust #9144

brson opened this issue Sep 12, 2013 · 2 comments · Fixed by #9258

Comments

@brson
Copy link
Contributor

brson commented Sep 12, 2013

This is always under debate. Here are some things that are currently considered unsafe:

  • Anything that can cause segfaults, invalid reads (memory unsafety)
  • Anything that can create invalid utf8 strings
  • Anything that can invoke undefined behavior (ptr::offset)
  • Data races
  • Deadlocks (in extra::arc)

Things that are not typically considered unsafe:

  • Deadlocks
@thestinger
Copy link
Contributor

We can hash this out in a wiki page before turning it into official documentation:

https://github.com/mozilla/rust/wiki/Unsafety-draft

@pnkfelix
Copy link
Member

Nominating for milestone 1: Well defined.

bors added a commit that referenced this issue Sep 18, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 18, 2022
…giraffate

Fix span for or_fun_call

Closes rust-lang#9033
changelog: [`or_fun_call`]: span points to the `unwrap_or` only instead of through the entire method chain expression
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 a pull request may close this issue.

3 participants