Daniel Franklin
484bbeba1e
Update src/send-and-sync.md
...
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
4 years ago
Daniel Franklin
09d4be20f4
Update src/send-and-sync.md
...
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
4 years ago
Daniel Franklin
d060a51864
Reword
4 years ago
Daniel Franklin
a5da003cad
Fix memory leak and discuss implications
...
Based on [a comment][comment] by danielhenrymantilla
[comment]: https://github.com/rust-lang/nomicon/pull/259#discussion_r599950517
4 years ago
Daniel Franklin
9f9f909d91
Qualify with ptr::
4 years ago
Daniel Franklin
53661a5343
Description fixes by danielhenrymantilla
...
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
4 years ago
Daniel Franklin
75253ec543
Make out param stack local, fix for zero sized types
...
Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
4 years ago
Daniel Franklin
e542c32c45
Add heading
4 years ago
Daniel Franklin
357eab4857
Fix formatting
...
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
4 years ago
Daniel Franklin
2dd3566f40
Use american spelling
...
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
4 years ago
Daniel Franklin
29f7139713
Reduce untested code
4 years ago
Daniel Franklin
05a2df52a4
Fix missing trait bounds
4 years ago
Daniel Franklin
c3ba1789e7
Fix soundness issues in new
...
danielhenrymantilla pointed out the issues.
4 years ago
Daniel Franklin
8739b01e18
Don't execute example code
...
Making the code executable would require adding a lot of duplicated
hidden lines, plus libc isn't available.
4 years ago
Daniel Franklin
a29fff0d7d
Add example of analyzing soundness of Send/Sync
...
Add an example of thinking through whether it is sound to implement Send
+ Sync for a custom type that wraps a raw pointer.
I read the existing docs and was confused about whether I could
implement Send + Sync for a type I wrote that wraps a c-style array.
Kixiron, InfernoDeity, Talchas, and HeroicKatora on #black-magic
helped me understand Send and Sync better. This example is based on the
advice they gave me. I've made lots of changes, so any errors are
probably mine.
4 years ago
Yuki Okushi
6fe476943a
Merge pull request #257 from skade/opaque-types-fix
4 years ago
Florian Gilcher
90811705ca
Fix opaque type representation.
...
Co-authored-by: Nikolai Vazquez <github@nikolaivazquez.com>
4 years ago
Yuki Okushi
adca786547
Merge pull request #254 from mdaverde/ml/adds-compiler-err-lifetimes
4 years ago
Eric Huss
bbf06ad39d
Merge pull request #255 from cherryblossom000/patch-1
...
Fix alloc link in exotic-sizes for local docs
5 years ago
cherryblossom000
7278a42dd5
Fix alloc link in exotic-sizes for local docs
...
This changes `https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html#tymethod.alloc ` to `../std/alloc/trait.GlobalAlloc.html#tymethod.alloc` so that it uses the local docs installation if the page is viewed with the local docs.
5 years ago
Milan
856595872a
Adds compile error for example in improperly reduced borrows
5 years ago
Milan
cba5941207
Changes wording under improperly reduced borrows
5 years ago
ThePuzzlemaker
1713e9fe80
Remove TODO
5 years ago
James [Undefined]
6b6c0a6bf1
Fix small punctuation error
...
Co-authored-by: Alexis Beingessner <a.beingessner@gmail.com>
5 years ago
ThePuzzlemaker
c2919c685f
Arc revisions (Clone atomic explanation) (pt2/3(+?))
5 years ago
ThePuzzlemaker
e16ed7f336
Fix Arc Clone
5 years ago
ThePuzzlemaker
57fd6cf32b
Arc revisions (pt1/2(+?))
5 years ago
ThePuzzlemaker
9da6fbf6cd
Simple Arc implementation (without Weak refs)
...
This is a squash of the following commits:
- Fix code, remove WIP message as that was while writing this, and link to stable @ fixed 1.49 rather than latest nightly
- Improve wording on deref and ignore some code blocks
- Improve wording and formatting a bit cause I'm insane
- Fix links
- Fix links again because we all love relative links
- Remove unnecessary Drop import
- Use Box::from_raw instead of ptr::drop_in_place as that actually dealloc's the Box (i'm dumb and misinterpreted the std code :/); fix some desync between code in between sections
- Fix tests
5 years ago
Lukas Hettwer
a8584998ea
Update vector code examples
...
The code samples were different from the final code and included
deprecated API calls.
5 years ago
Yuki Okushi
a3180eb461
Remove outdated information about `jemalloc`
5 years ago
Yuki Okushi
a5a48441d4
Merge pull request #249 from jflatow/patch-1
...
Update atomics.md
5 years ago
Eric Huss
79e60b572a
Merge pull request #248 from JohnTitor/allocator
...
Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate`
5 years ago
Jared Flatow
bdb189862a
Update atomics.md
5 years ago
Yuki Okushi
3fd89d64e7
Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate`
5 years ago
unknown
d8383b65f7
Clarify that any alignment is valid for ZSTs
5 years ago
Yuki Okushi
23c49f1d5c
Merge pull request #238 from mexus/master
5 years ago
Yuki Okushi
cb88439ac9
Update src/coercions.md
5 years ago
Eric Huss
ea054bb935
Merge pull request #244 from JohnTitor/some-tweaks
...
Some tweaks
5 years ago
Yuki Okushi
9e9ee0a822
Merge pull request #245 from camelid/uppercase-repr-rust
5 years ago
Camelid
038a7e6238
Uppercase `repr(Rust)`
...
There were two spots where it referred to `repr(rust)` when it is
usually referred to as `repr(Rust)` in accordance with `repr(C)`.
I updated those to use the uppercase form.
5 years ago
Yuki Okushi
e948943445
Remove unnecessary chapter
5 years ago
Yuki Okushi
a0d9dbdef3
Git-ignore linkcheck stuff
5 years ago
Yuki Okushi
ee0d4be726
Replace hard tabs with whitespaces
5 years ago
Yuki Okushi
0cfd181886
Merge pull request #224 from updogliu/patch-1
...
Update atomics.md
5 years ago
Yuki Okushi
8d3237ffd4
Merge pull request #187 from ChrisGreenaway/patch-2
...
Update send-and-sync.md
5 years ago
Yuki Okushi
45b640d76a
Merge pull request #231 from lwintermelon/patch-1
...
fix a typo
5 years ago
Yuki Okushi
d7c2815252
Merge pull request #242 from camelid/improve-transmutes
...
Improve formatting of "Transmutes" chapter
5 years ago
Camelid
ebe16b1455
Improve formatting of "Transmutes" chapter
...
* Use inline code style for `&` and `&mut`
* Add blank lines between list items to make source easier to read
* Use new-style mdBook link
5 years ago
Yuki Okushi
8627458725
Merge pull request #241 from simon-lammes/patch-1
5 years ago
Simon Lammes
52b55e0db0
fix minor grammar mistake
5 years ago