-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
docs: begin a "low-level & unsafe code" guide. #12887
Conversation
} | ||
c | ||
} | ||
# fn main() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this show some example usage with an assert!
that it's correct?
This is pretty awesome, nice job! |
Any use of `asm` is feature gated (requires `#[feature(asm)];` on the | ||
crate to allow) and of course requires an `unsafe` block. | ||
|
||
> **Note**: the examples here are given in x86/x86-64 assembly, but all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: x86_64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, hyphen is valid (and seems to be the conventional one too, ~3x more google results for x86-64
than x86_64
): http://en.wikipedia.org/wiki/X86-64
Excellent work. Loving it so far! |
Addressed the review (mostly). |
r=me with my comment plus a squash |
looks great to me |
This aims to cover the basics of writing safe unsafe code. At the moment it is just designed to be a better place for the `asm!()` docs than the detailed release notes wiki page, and I took the time to write up some other things. More examples are needed, especially of things that can subtly go wrong; and vast areas of `unsafe`-ty aren't covered, e.g. `static mut`s and thread-safety in general.
docs: begin a "low-level & unsafe code" guide. This aims to cover the basics of writing safe unsafe code. At the moment it is just designed to be a better place for the `asm!()` docs than the detailed release notes wiki page, and I took the time to write up some other things. More examples are needed, especially of things that can subtly go wrong; and vast areas of `unsafe`-ty aren't covered, e.g. `static mut`s and thread-safety in general.
fix: Honor ref expressions for compute_ref_match completions Fixes rust-lang/rust-analyzer#8357
docs: begin a "low-level & unsafe code" guide.
This aims to cover the basics of writing safe unsafe code. At the moment
it is just designed to be a better place for the
asm!()
docs than thedetailed release notes wiki page, and I took the time to write up some
other things.
More examples are needed, especially of things that can subtly go wrong;
and vast areas of
unsafe
-ty aren't covered, e.g.static mut
s andthread-safety in general.