Skip to content

Commit 35e395c

Browse files
authored
Use id attribute for <a> tags instead of deprecated name attribute (#2184)
1 parent ad93c5f commit 35e395c

16 files changed

+27
-27
lines changed

src/appendix/background.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This section covers a numbers of common compiler terms that arise in
44
this guide. We try to give the general definition while providing some
55
Rust-specific context.
66

7-
<a name="cfg"></a>
7+
<a id="cfg"></a>
88

99
## What is a control-flow graph?
1010

@@ -100,7 +100,7 @@ When using a control-flow graph, a loop simply appears as a cycle in
100100
the graph, and the `break` keyword translates into a path out of that
101101
cycle.
102102

103-
<a name="dataflow"></a>
103+
<a id="dataflow"></a>
104104

105105
## What is a dataflow analysis?
106106

@@ -186,7 +186,7 @@ useful. For example, rather than starting from block (A) and moving forwards,
186186
we might have started with the usage of `x` and moved backwards to try to find
187187
its initialization.
188188

189-
<a name="quantified"></a>
189+
<a id="quantified"></a>
190190

191191
## What is "universally quantified"? What about "existentially quantified"?
192192

@@ -233,7 +233,7 @@ fn foo(_: dyn Debug)
233233
This function claims that there exists some type `T` that implements `Debug`
234234
such that the function is well-typed: `∃ T: (T: Debug) and well_typed(foo)`.
235235

236-
<a name="variance"></a>
236+
<a id="variance"></a>
237237

238238
## What is a de Bruijn Index?
239239

@@ -268,7 +268,7 @@ Check out the subtyping chapter from the
268268
See the [variance](../variance.html) chapter of this guide for more info on how
269269
the type checker handles variance.
270270

271-
<a name="free-vs-bound"></a>
271+
<a id="free-vs-bound"></a>
272272

273273
## What is a "free region" or a "free variable"? What about "bound region"?
274274

src/borrow_check/region_inference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ TODO: write about _how_ these regions are computed.
7070

7171
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/universal_regions/struct.UniversalRegions.html
7272

73-
<a name="region-variables"></a>
73+
<a id="region-variables"></a>
7474

7575
## Region variables
7676

src/borrow_check/region_inference/member_constraints.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ This choice is consistent with the general 'flow' of region
171171
propagation, which always aims to compute a minimal value for the
172172
region being inferred. However, it is somewhat arbitrary.
173173

174-
<a name="collecting"></a>
174+
<a id="collecting"></a>
175175

176176
### Collecting upper bounds in the implementation
177177

src/bug-fix-procedure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ that we use for unstable features:
227227
Ideally, breaking changes should have landed on the **stable branch** of the
228228
compiler before they are finalized.
229229

230-
<a name="guide">
230+
<a id="guide">
231231

232232
### Removing a lint
233233

src/conventions.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ chapter covers [formatting](#formatting), [coding for correctness](#cc),
33
[using crates from crates.io](#cio), and some tips on
44
[structuring your PR for easy review](#er).
55

6-
<a name="formatting"></a>
6+
<a id="formatting"></a>
77

88
# Formatting and the tidy script
99

@@ -40,7 +40,7 @@ When modifying that code, use this command to format it:
4040
This uses a pinned version of `clang-format`, to avoid relying on the local
4141
environment.
4242

43-
<a name="copyright"></a>
43+
<a id="copyright"></a>
4444

4545
<!-- REUSE-IgnoreStart -->
4646
<!-- Prevent REUSE from interpreting the heading as a copyright notice -->
@@ -71,7 +71,7 @@ that case, you can add a comment towards the top of the file like so:
7171

7272
Prefer 4-space indent.
7373

74-
<a name="cc"></a>
74+
<a id="cc"></a>
7575

7676
# Coding for correctness
7777

@@ -113,13 +113,13 @@ if foo {
113113
}
114114
```
115115

116-
<a name="cio"></a>
116+
<a id="cio"></a>
117117

118118
# Using crates from crates.io
119119

120120
See the [crates.io dependencies][crates] section.
121121

122-
<a name="er"></a>
122+
<a id="er"></a>
123123

124124
# How to structure your PR
125125

src/hir.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ the compiler a chance to observe that you accessed the data for
7474

7575
[`&rustc_hir::Item`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Item.html
7676

77-
<a name="hir-id"></a>
77+
<a id="hir-id"></a>
7878

7979
## Identifiers in the HIR
8080

src/mir/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ As a consequence, all decoding of `ValTree` must happen by matching on the type
325325
decisions depending on that. The value itself gives no useful information without the type that
326326
belongs to it.
327327

328-
<a name="promoted"></a>
328+
<a id="promoted"></a>
329329

330330
### Promoted constants
331331

src/notification-groups/about.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ particularly those of **middle priority**:
4343
can accumulate over time, and the role of the notification group is
4444
to try and stop that from happening!
4545

46-
<a name="join"></a>
46+
<a id="join"></a>
4747

4848
## Joining a notification group
4949

src/queries/incremental-compilation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Try-mark-green works as follows:
9292
- Otherwise, **all** of the nodes in `reads(Q)` must be **green**. In that
9393
case, we can color Q as **green** and return.
9494

95-
<a name="dag"></a>
95+
<a id="dag"></a>
9696

9797
### The query DAG
9898

src/stabilization_guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ following steps:
1313

1414
## Documentation PRs
1515

16-
<a name="updating-documentation"></a>
16+
<a id="updating-documentation"></a>
1717

1818
If any documentation for this feature exists, it should be
1919
in the [`Unstable Book`], located at [`src/doc/unstable-book`].

src/tests/adding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ if the new output makes sense.
180180

181181
You may also need to re-bless the output with the `--bless` flag.
182182

183-
<a name="explanatory_comment"></a>
183+
<a id="explanatory_comment"></a>
184184

185185
## Comment explaining what the test is about
186186

src/traits/canonical-queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Rc<?T>: Clone
9595

9696
After all, `Rc<?T>` is true **no matter what type `?T` is**.
9797

98-
<a name="query-response"></a>
98+
<a id="query-response"></a>
9999

100100
## A trait query in rustc
101101

src/traits/goals-and-clauses.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In terms of code, these types are defined in
4747
[traits_mod]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/traits/mod.rs
4848
[chalk_ir]: https://github.com/rust-lang/chalk/blob/master/chalk-ir/src/lib.rs
4949

50-
<a name="domain-goals"></a>
50+
<a id="domain-goals"></a>
5151

5252
## Domain goals
5353

@@ -63,7 +63,7 @@ forall<K1, ..., Kn> { DomainGoal :- Goal }
6363
hence domain goals are in fact clauses' LHS. That is, at the most granular level,
6464
domain goals are what the trait solver will end up trying to prove.
6565

66-
<a name="trait-ref"></a>
66+
<a id="trait-ref"></a>
6767

6868
To define the set of domain goals in our system, we need to first
6969
introduce a few simple formulations. A **trait reference** consists of
@@ -78,7 +78,7 @@ IntoIterator`. Note that Rust surface syntax also permits some extra
7878
things, like associated type bindings (`Vec<T>: IntoIterator<Item =
7979
T>`), that are not part of a trait reference.
8080

81-
<a name="projection"></a>
81+
<a id="projection"></a>
8282

8383
A **projection** consists of an associated item reference along with
8484
its inputs P0..Pm:
@@ -205,7 +205,7 @@ e.g. `Outlives(&'a str: 'b)`, `Outlives('a: 'static)`
205205

206206
True if the given type or region on the left outlives the right-hand region.
207207

208-
<a name="coinductive"></a>
208+
<a id="coinductive"></a>
209209

210210
## Coinductive goals
211211

src/type-inference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The `tcx.infer_ctxt` method actually returns a builder, which means
5151
there are some kinds of configuration you can do before the `infcx` is
5252
created. See `InferCtxtBuilder` for more information.
5353

54-
<a name="vars"></a>
54+
<a id="vars"></a>
5555

5656
## Inference variables
5757

src/variance.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ will wind up being considered green after it is re-evaluated.
143143

144144
[rga]: ./queries/incremental-compilation.html
145145

146-
<a name="addendum"></a>
146+
<a id="addendum"></a>
147147

148148
## Addendum: Variance on traits
149149

src/walkthrough.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Here is the tracking issue on for our [`?` macro feature][tracking].
151151

152152
[tracking]: https://github.com/rust-lang/rust/issues/48075
153153

154-
<a name="impl"></a>
154+
<a id="impl"></a>
155155

156156
## Implementation
157157

0 commit comments

Comments
 (0)