summaryrefslogtreecommitdiffstats
path: root/src/doc/nomicon
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/nomicon')
-rw-r--r--src/doc/nomicon/src/atomics.md2
-rw-r--r--src/doc/nomicon/src/exception-safety.md4
-rw-r--r--src/doc/nomicon/src/ffi.md1
-rw-r--r--src/doc/nomicon/src/leaking.md6
-rw-r--r--src/doc/nomicon/src/vec/vec-final.md2
-rw-r--r--src/doc/nomicon/src/vec/vec-zsts.md2
6 files changed, 9 insertions, 8 deletions
diff --git a/src/doc/nomicon/src/atomics.md b/src/doc/nomicon/src/atomics.md
index 6aef6aee6..72a2d56fd 100644
--- a/src/doc/nomicon/src/atomics.md
+++ b/src/doc/nomicon/src/atomics.md
@@ -76,7 +76,7 @@ For instance, say we convince the compiler to emit this logic:
```text
initial state: x = 0, y = 1
-THREAD 1 THREAD2
+THREAD 1 THREAD 2
y = 3; if x == 1 {
x = 1; y *= 2;
}
diff --git a/src/doc/nomicon/src/exception-safety.md b/src/doc/nomicon/src/exception-safety.md
index ca1a39416..8404bb859 100644
--- a/src/doc/nomicon/src/exception-safety.md
+++ b/src/doc/nomicon/src/exception-safety.md
@@ -161,9 +161,9 @@ impl<'a, T> Hole<'a, T> {
unsafe {
let elt = ptr::read(&data[pos]);
Hole {
- data: data,
+ data,
elt: Some(elt),
- pos: pos,
+ pos,
}
}
}
diff --git a/src/doc/nomicon/src/ffi.md b/src/doc/nomicon/src/ffi.md
index 55be225de..b76f0b2ac 100644
--- a/src/doc/nomicon/src/ffi.md
+++ b/src/doc/nomicon/src/ffi.md
@@ -586,6 +586,7 @@ are:
* `aapcs`
* `cdecl`
* `fastcall`
+* `thiscall`
* `vectorcall`
This is currently hidden behind the `abi_vectorcall` gate and is subject to change.
* `Rust`
diff --git a/src/doc/nomicon/src/leaking.md b/src/doc/nomicon/src/leaking.md
index ea29595f4..d90fed571 100644
--- a/src/doc/nomicon/src/leaking.md
+++ b/src/doc/nomicon/src/leaking.md
@@ -134,10 +134,10 @@ impl<T> Rc<T> {
// Wouldn't it be nice if heap::allocate worked like this?
let ptr = heap::allocate::<RcBox<T>>();
ptr::write(ptr, RcBox {
- data: data,
+ data,
ref_count: 1,
});
- Rc { ptr: ptr }
+ Rc { ptr }
}
}
@@ -194,7 +194,7 @@ pub fn scoped<'a, F>(f: F) -> JoinGuard<'a>
```
Here `f` is some closure for the other thread to execute. Saying that
-`F: Send +'a` is saying that it closes over data that lives for `'a`, and it
+`F: Send + 'a` is saying that it closes over data that lives for `'a`, and it
either owns that data or the data was Sync (implying `&data` is Send).
Because JoinGuard has a lifetime, it keeps all the data it closes over
diff --git a/src/doc/nomicon/src/vec/vec-final.md b/src/doc/nomicon/src/vec/vec-final.md
index 696391d10..e680e0d65 100644
--- a/src/doc/nomicon/src/vec/vec-final.md
+++ b/src/doc/nomicon/src/vec/vec-final.md
@@ -23,7 +23,7 @@ impl<T> RawVec<T> {
// `NonNull::dangling()` doubles as "unallocated" and "zero-sized allocation"
RawVec {
ptr: NonNull::dangling(),
- cap: cap,
+ cap,
}
}
diff --git a/src/doc/nomicon/src/vec/vec-zsts.md b/src/doc/nomicon/src/vec/vec-zsts.md
index 8f2529727..6715f9478 100644
--- a/src/doc/nomicon/src/vec/vec-zsts.md
+++ b/src/doc/nomicon/src/vec/vec-zsts.md
@@ -39,7 +39,7 @@ impl<T> RawVec<T> {
// `NonNull::dangling()` doubles as "unallocated" and "zero-sized allocation"
RawVec {
ptr: NonNull::dangling(),
- cap: cap,
+ cap,
}
}