Skip to content

Commit b858f21

Browse files
committed
Auto merge of #28372 - killercup:docs/nomicon-markup-fixes, r=steveklabnik
The style `[name][]` does not work with Pandoc, whereas `[name]` does. I hope hoedown accepts this as well. r? @steveklabnik
2 parents d89a10b + 4828c88 commit b858f21

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/doc/nomicon/destructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<T> Drop for Box<T> {
5252
```
5353

5454
and this works fine because when Rust goes to drop the `ptr` field it just sees
55-
a [Unique][] that has no actual `Drop` implementation. Similarly nothing can
55+
a [Unique] that has no actual `Drop` implementation. Similarly nothing can
5656
use-after-free the `ptr` because when drop exits, it becomes inacessible.
5757

5858
However this wouldn't work:

src/doc/nomicon/meet-safe-and-unsafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Unlike C, Undefined Behaviour is pretty limited in scope in Rust. All the core
6060
language cares about is preventing the following things:
6161

6262
* Dereferencing null or dangling pointers
63-
* Reading [uninitialized memory][]
64-
* Breaking the [pointer aliasing rules][]
63+
* Reading [uninitialized memory]
64+
* Breaking the [pointer aliasing rules]
6565
* Producing invalid primitive values:
6666
* dangling/null references
6767
* a `bool` that isn't 0 or 1

src/doc/nomicon/other-reprs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ still consumes a byte of space.
2626
* DSTs, tuples, and tagged unions are not a concept in C and as such are never
2727
FFI safe.
2828

29-
* **If the type would have any [drop flags][], they will still be added**
29+
* **If the type would have any [drop flags], they will still be added**
3030

3131
* This is equivalent to one of `repr(u*)` (see the next section) for enums. The
3232
chosen size is the default enum size for the target platform's C ABI. Note that

src/doc/nomicon/safe-unsafe-meaning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ unchecked contracts:
3535

3636
There is also `#[unsafe_no_drop_flag]`, which is a special case that exists for
3737
historical reasons and is in the process of being phased out. See the section on
38-
[drop flags][] for details.
38+
[drop flags] for details.
3939

4040
Some examples of unsafe functions:
4141

@@ -44,7 +44,7 @@ Some examples of unsafe functions:
4444
* `ptr::offset` is an intrinsic that invokes Undefined Behaviour if it is
4545
not "in bounds" as defined by LLVM.
4646
* `mem::transmute` reinterprets some value as having the given type,
47-
bypassing type safety in arbitrary ways. (see [conversions][] for details)
47+
bypassing type safety in arbitrary ways. (see [conversions] for details)
4848
* All FFI functions are `unsafe` because they can do arbitrary things.
4949
C being an obvious culprit, but generally any language can do something
5050
that Rust isn't happy about.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ captures this through the `Send` and `Sync` traits.
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
13-
foremost, they're [unsafe traits][]. This means that they are unsafe to
13+
foremost, they're [unsafe traits]. This means that they are unsafe to
1414
implement, and other unsafe code can assume that they are correctly
1515
implemented. Since they're *marker traits* (they have no associated items like
1616
methods), correctly implemented simply means that they have the intrinsic

src/doc/nomicon/transmutes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ same size. The ways to cause Undefined Behaviour with this are mind boggling.
2121
* No you can't do it
2222
* No you're not special
2323
* Transmuting to a reference without an explicitly provided lifetime
24-
produces an [unbounded lifetime][]
24+
produces an [unbounded lifetime]
2525

2626
`mem::transmute_copy<T, U>` somehow manages to be *even more* wildly unsafe than
2727
this. It copies `size_of<U>` bytes out of an `&T` and interprets them as a `U`.

0 commit comments

Comments
 (0)