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

Expand the unsafe & low-level guide to cover static mut, more #[no_std], modern asm! #12905

Closed
6 tasks
huonw opened this issue Mar 15, 2014 · 2 comments
Closed
6 tasks

Comments

@huonw
Copy link
Member

huonw commented Mar 15, 2014

The unsafe & low-level code guide added in #12887 should cover:

  • transmute/casting
  • the Unsafe type (for inner mutability)
  • the relevance of the various kinds (i.e. Sync etc.), and when to apply the types in std::kinds::marker to ensure safety
  • static mut, including atomics and static mutexes
  • #[no_std] in more detail: I don't know enough about the correct compilation flags, and symbols required, so that section is rather loose on detail
  • the asm! syntax described isn't 100% up-to-date; I took it from the description in the 0.6 release notes, and there have been extensions and improvements since that was written.
@huonw huonw added the A-docs label Mar 15, 2014
@flaper87
Copy link
Contributor

Triage bump: still needs to be updated.

@steveklabnik Gentle heads up

steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.

This addresses part of rust-lang#12905.
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
Due to documenting `transmute`, addresses part of rust-lang#12905
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.

This addresses part of rust-lang#12905.
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 20, 2015
…richton

Due to documenting `transmute`, addresses part of rust-lang#12905
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 21, 2015
…ichton

Many unsafe features are now in the unstable section, so this section is
really just about raw pointers now. That also makes sense for its place
in the TOC.

This addresses part of rust-lang#12905.
steveklabnik added a commit to steveklabnik/rust that referenced this issue Apr 21, 2015
…richton

Due to documenting `transmute`, addresses part of rust-lang#12905
@steveklabnik
Copy link
Member

Okay, so at this point:

  • transmute/casting - covered in the casting chapter
  • the Unsafe type (for inner mutability) - would be nice to have in a guide, but api docs work too
  • the relevance of the various kinds - same
  • static mut, including atomics and static mutexes - covered in the statics chapter, could beef up atomics/mutexes though
  • #[no_std] in more detail: - has its own chapter
  • the asm! syntax - has its own chapter.

as such, I'm going to give this a close. Adding a "building unsafe abstractions safely" chapter would be nice for Effective Rust, but I'm not leaving tickets open for possible chapters right now.

lnicola pushed a commit to lnicola/rust that referenced this issue Aug 16, 2022
Generate rust type from json

fix rust-lang#10118

Should this be a diagnostic? I made it a diagnostic because of issue label.
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

No branches or pull requests

3 participants