Skip to content

Commit ae9abdf

Browse files
committed
Rollup merge of rust-lang#27419 - cpjreynolds:master, r=Gankro
Corrects formatting of bullet-ed sentences and changes 'pervasive use raw pointers' to 'pervasive use of raw pointers'.
2 parents 21dd5e6 + d10953e commit ae9abdf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/doc/tarpl/send-and-sync.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ multiply alias a location in memory while mutating it. Unless these types use
55
synchronization to manage this access, they are absolutely not thread safe. Rust
66
captures this with through the `Send` and `Sync` traits.
77

8-
* A type is Send if it is safe to send it to another thread. A type is Sync if
9-
* it is safe to share between threads (`&T` is Send).
8+
* A type is Send if it is safe to send it to another thread.
9+
* A type is Sync if it is safe to share between threads (`&T` is Send).
1010

1111
Send and Sync are fundamental to Rust's concurrency story. As such, a
1212
substantial amount of special tooling exists to make them work right. First and
@@ -24,9 +24,9 @@ pretty much all types you'll ever interact with are Send and Sync.
2424

2525
Major exceptions include:
2626

27-
* raw pointers are neither Send nor Sync (because they have no safety guards)
28-
* `UnsafeCell` isn't Sync (and therefore `Cell` and `RefCell` aren't) `Rc` isn't
29-
* Send or Sync (because the refcount is shared and unsynchronized)
27+
* raw pointers are neither Send nor Sync (because they have no safety guards).
28+
* `UnsafeCell` isn't Sync (and therefore `Cell` and `RefCell` aren't).
29+
* `Rc` isn't Send or Sync (because the refcount is shared and unsynchronized).
3030

3131
`Rc` and `UnsafeCell` are very fundamentally not thread-safe: they enable
3232
unsynchronized shared mutable state. However raw pointers are, strictly
@@ -70,7 +70,7 @@ possible cause trouble by being incorrectly Send or Sync.
7070
Most uses of raw pointers should be encapsulated behind a sufficient abstraction
7171
that Send and Sync can be derived. For instance all of Rust's standard
7272
collections are Send and Sync (when they contain Send and Sync types) in spite
73-
of their pervasive use raw pointers to manage allocations and complex ownership.
73+
of their pervasive use of raw pointers to manage allocations and complex ownership.
7474
Similarly, most iterators into these collections are Send and Sync because they
7575
largely behave like an `&` or `&mut` into the collection.
7676

0 commit comments

Comments
 (0)