Skip to content

Commit 131858b

Browse files
authored
Merge pull request #3878 from ehuss/markup-fixes
Apply several markup fixes
2 parents 9e98801 + 44dfc44 commit 131858b

15 files changed

+30
-31
lines changed

text/0048-traits.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ put onto a surer footing.
2626

2727
## Use cases
2828

29-
### Poor interaction with overloadable deref and index <a name=overload>
29+
### Poor interaction with overloadable deref and index { #overload }
3030

3131
*Addressed by:* New method resolution algorithm.
3232

@@ -66,7 +66,7 @@ manually specified by making the receiver type fully explicit: `(&mut
6666
address this problem, as well as the question of how to handle copies
6767
and moves of the referent (use #3 in my list above).
6868

69-
### Lack of backtracking <a name=backtrack>
69+
### Lack of backtracking { #backtrack }
7070

7171
*Addressed by:* New method resolution algorithm.
7272

@@ -190,7 +190,7 @@ property. And the popularity and usefulness of blanket impls cannot
190190
be denied. Therefore, I think this property ("always being able to
191191
add impls") is not especially useful or important.
192192

193-
### Hokey implementation <a name=hokey>
193+
### Hokey implementation { #hokey }
194194

195195
*Addressed by:* Gradual vtable resolution algorithm
196196

@@ -298,7 +298,7 @@ personal preference, if we can achieve it).
298298
The coherence rules fall into two categories: the *orphan* restriction
299299
and the *overlapping implementations* restriction.
300300

301-
<a name=orphan>
301+
<span id="orphan"></span>
302302

303303
*Orphan check*: Every implementation must meet one of
304304
the following conditions:
@@ -679,9 +679,9 @@ probably an error. DEFERRED obligations are ok until we reach the end
679679
of the function. For details, please refer to the
680680
[prototype][prototype].
681681

682-
# Alternatives and downsides <a name=alternatives>
682+
# Alternatives and downsides { #alternatives }
683683

684-
## Autoderef and ambiguity <a name=ambig>
684+
## Autoderef and ambiguity { #ambig }
685685

686686
The addition of a `Deref` trait makes autoderef complicated, because
687687
we may encounter situations where the smart pointer *and* its
@@ -707,46 +707,46 @@ needs to be evaluated.
707707

708708
# Footnotes
709709

710-
<a name=1>
710+
<span id="1"></span>
711711

712712
**Note 1:** when combining with DST, the `in` keyword goes
713713
first, and then any other qualifiers. For example, `in unsized RHS` or
714714
`in type RHS` etc. (The precise qualifier in use will depend on the
715715
DST proposal.)
716716

717-
<a name=2>
717+
<span id="2"></span>
718718

719719
**Note 2:** Note that the `DerefMut<T>` trait extends
720720
`Deref<T>`, so if a type supports mutable derefs, it must also support
721721
immutable derefs.
722722

723-
<a name=3>
723+
<span id="3"></span>
724724

725725
**Note 3:** The restriction that inputs must precede outputs
726726
is not strictly necessary. I added it to keep options open concerning
727727
associated types and so forth. See the
728728
[Alternatives section](#alternatives), specifically the section on
729729
[associated types](#assoc).
730730

731-
<a name=4>
731+
<span id="4"></span>
732732

733733
**Note 4:** The prioritization of inherent methods could be
734734
reconsidered after DST has been implemented. It is currently needed to
735735
make impls like `impl Trait for ~Trait` work.
736736

737-
<a name=5>
737+
<span id="5"></span>
738738

739739
**Note 5:** The set of in-scope traits is currently defined
740740
as those that are imported by name. PR #37 proposes possible changes
741741
to this rule.
742742

743-
<a name=6>
743+
<span id="6"></span>
744744

745745
**Note 6:** In the section on [autoderef and ambiguity](#ambig), I
746746
discuss alternate rules that might allow us to lift the requirement
747747
that the receiver be named `self`.
748748

749-
<a name=7>
749+
<span id="7"></span>
750750

751751
**Note 7:** I am considering introducing mechanisms in a subsequent
752752
RFC that could be used to express mutual exclusion of traits.

text/0116-no-module-shadowing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ released.
181181

182182
Right now its legal to write this:
183183
```rust
184-
fn main() {
184+
fn main() {
185185
use Bar = std::result::Result;
186186
use Bar = std::option::Option;
187187
let x: Bar<uint> = None;
188-
}
188+
}
189189
```
190190
where the latter `use` shadows the former. This would have to be forbidden as well,
191191
however the current semantic seems like a accident anyway.

text/0256-remove-refcounting-gc-of-t.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ still in place; the move to a library type `Gc<T>` was just a shift in
4747
perspective from the end-user's point of view (and that of the
4848
parser).
4949

50-
## Recent history: Removing uses of Gc<T> from the compiler
50+
## Recent history: Removing uses of `Gc<T>` from the compiler
5151

5252
Largely due to the tireless efforts of `eddyb`, one of the primary
5353
clients of `Gc<T>`, namely the `rustc` compiler itself, has little to

text/0736-privacy-respecting-fru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Here is an attempt to transcribe/summarize them:
309309

310310
This seems pretty fragile; i.e., easy to forget.
311311

312-
6. Outlaw the trivial FRU form Foo { ..<expr> }. That is, to use
312+
6. Outlaw the trivial FRU form `Foo { ..<expr> }`. That is, to use
313313
FRU, you have to use at least one field in the constructing
314314
expression. Again, this implies that types like Vec and HashMap
315315
will not be subject to the vulnerability outlined here.

text/0738-variance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ contravariant.
348348
**Why contravariance?** To see why contravariance is correct, you have
349349
to consider what it means for `Self` to be contravariant for a marker
350350
trait. It means that if I have evidence that `T : Copy`, then I can
351-
use that as evidence to show that `U
352-
: Copy` if `U <: T`. More formally:
351+
use that as evidence to show that `U : Copy` if `U <: T`. More formally:
353352

354353
(T : Copy) <: (U : Copy) // I can use `T:Copy` where `U:Copy` is expected...
355354
U <: T // ...so long as `U <: T`

text/0771-std-iter-once.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This is a common task when working with iterators. Currently, this can be done i
1212

1313
# Detailed design
1414

15-
`once` will return a new struct, `std::iter::Once<T>`, implementing Iterator<T>. Internally, `Once<T>` is simply a newtype wrapper around `std::option::IntoIter<T>`. The actual body of `once` is thus trivial:
15+
`once` will return a new struct, `std::iter::Once<T>`, implementing `Iterator<T>`. Internally, `Once<T>` is simply a newtype wrapper around `std::option::IntoIter<T>`. The actual body of `once` is thus trivial:
1616

1717
```rust
1818
pub struct Once<T>(std::option::IntoIter<T>);

text/1228-placement-left-arrow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ applied to the original `in (PLACE_EXPR) VALUE_EXPR` syntax):
5959
6060
* [p1start](https://github.com/rust-lang/rfcs/pull/809#issuecomment-73837430)
6161

62-
> I’m not a fan of in <place> { <stmts> }, simply because the
62+
> I’m not a fan of `in <place> { <stmts> }`, simply because the
6363
> requirement of a block suggests that it’s some kind of control
6464
> flow structure, or that all the statements inside will be
65-
> somehow run ‘in’ the given <place> (or perhaps, as @m13253
65+
> somehow run ‘in’ the given `<place>` (or perhaps, as @m13253
6666
> seems to have interpreted it, for all box expressions to go
6767
> into the given place). It would be our first syntactical
6868
> construct which is basically just an operator that has to

text/1298-incremental-compilation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ I've uncovered a few fishy cases where we using the node id from
247247
external crates to index into the local crate's HIR map, which is
248248
certainly incorrect. --nmatsakis
249249

250-
<a id="depgraph">
250+
<a id="depgraph"></a>
251251
## Identifying and tracking dependencies
252252

253253
### Core idea: a fine-grained dependency graph

text/1398-kinds-of-allocators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ So, an interaction between a program, a collection library, and an
166166
allocator might look like this:
167167

168168
<img width="800" src="https://rawgit.com/pnkfelix/pnkfelix.github.com/69230e5f1ea140c0a09c5a9fdd7f0766207cdddd/Svg/allocator-msc.svg">
169+
169170
If you cannot see the SVG linked here, try the [ASCII art version][ascii-art] appendix.
170171
Also, if you have suggestions for changes to the SVG, feel free to write them as a comment
171172
in that appendix; (but be sure to be clear that you are pointing out a suggestion for the SVG).
172-
</img>
173173

174174
In general, an allocator might be the backing memory pool itself; or
175175
an allocator might merely be a *handle* that references the memory

text/1644-default-and-expanded-rustc-errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ subsequent style RFC.
251251

252252
## Expanded error messages
253253

254-
Currently, --explain text focuses on the error code. You invoke the compiler with --explain
255-
<error code> and receive a verbose description of what causes errors of that number. The resulting
254+
Currently, --explain text focuses on the error code. You invoke the compiler with `--explain
255+
<error code>` and receive a verbose description of what causes errors of that number. The resulting
256256
message can be helpful, but it uses generic sample code which makes it feel less connected to the
257257
user's code.
258258

0 commit comments

Comments
 (0)