Skip to content

Update unsafe superpowers list from 5 to 8#4761

Open
Koji-Minami wants to merge 1 commit into
rust-lang:mainfrom
Koji-Minami:fix-unsafe-superpowers-count
Open

Update unsafe superpowers list from 5 to 8#4761
Koji-Minami wants to merge 1 commit into
rust-lang:mainfrom
Koji-Minami:fix-unsafe-superpowers-count

Conversation

@Koji-Minami

Copy link
Copy Markdown

The Rust Reference documents 8 unsafe operations, but the book only listed 5 and implied the list was exhaustive. This commit:

  • Replaces "five" with "several" to avoid implying exhaustiveness
  • Adds the three missing items:
    • Calling a target_feature-annotated function without that feature enabled
    • Declaring an unsafe extern block
    • Applying an unsafe attribute to an item

Fixes #4709

The Rust Reference documents 8 unsafe operations, but the book only
listed 5 and implied the list was exhaustive. This commit:
- Replaces "five" with "several" to avoid implying exhaustiveness
- Adds the three missing items:
  - Calling a target_feature-annotated function without that feature enabled
  - Declaring an unsafe extern block
  - Applying an unsafe attribute to an item

Fixes rust-lang#4709
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.

More unsafe super powers

1 participant