Skip to content

Overhaul of "Behavior not considered unsafe" #1937

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kleinesfilmroellchen
Copy link

Give this section of the reference a new paint job :3

Note: I’m not entirely sure if this section should even exist permanently. It doesn’t really fit in with strictly defining Rust’s behavior as such, since it describes lots of legal behavior that is simply surprising to users. It may fit better in the nomicon or a later part of the book. On the other hand, neither of those would suffer from the improvements made here.

  • Slightly rename the section to clarify that we refer to generally undesirable behavior.
  • Adopt language to authoritative spec language (do not use we, do not refer to implementations, use as specific of a language as possible)
  • Link to standard library
  • Link to applicable other sections
  • Use admonitions for existing text where applicable
  • Insert rule identifiers everywhere
  • Write a complete section for deadlocks, including a deadlocking code example
  • Expand the logic bug example with Hash and Eq into a full code example

Give this section of the reference a new paint job :3

Note: I’m not entirely sure if this section should even exist permanently. It doesn’t really fit in with strictly defining Rust’s behavior as such, since it describes lots of legal behavior that is simply surprising to users. It may fit better in the nomicon or a later part of the book. On the other hand, neither of those would suffer from the improvements made here.

- Slightly rename the section to clarify that we refer to generally undesirable behavior.
- Adopt language to authoritative spec language (do not use we, do not refer to implementations, use as specific of a language as possible)
- Link to standard library
- Link to applicable other sections
- Use admonitions for existing text where applicable
- Insert rule identifiers everywhere
- Write a complete section for deadlocks, including a deadlocking code example
- Expand the logic bug example with Hash and Eq into a full code example
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants