30
30
/// explicitly using `as` allows a few more coercions that aren't allowed implicitly, such as
31
31
/// changing the type of a raw pointer or turning closures into raw pointers.
32
32
///
33
- /// Other places `as` is used include as extra syntax for [`crate`] and [ `use`] , to change the name
33
+ /// Other places `as` is used include as extra syntax for [`crate`] and `use`, to change the name
34
34
/// something is imported as.
35
35
///
36
36
/// For more information on what `as` is capable of, see the [Reference]
37
37
///
38
38
/// [Reference]:
39
39
/// https://doc.rust-lang.org/reference/expressions/operator-expr.html#type-cast-expressions
40
40
/// [`crate`]: keyword.crate.html
41
- /// [`use`]: keyword.use.html
42
41
mod as_keyword { }
43
42
44
43
#[ doc( keyword = "const" ) ]
@@ -75,7 +74,7 @@ mod as_keyword { }
75
74
/// const WORDS: &str = "hello convenience!";
76
75
/// ```
77
76
///
78
- /// `const` items looks remarkably similar to [ `static`] items, which introduces some confusion as
77
+ /// `const` items looks remarkably similar to `static` items, which introduces some confusion as
79
78
/// to which one should be used at which times. To put it simply, constants are inlined wherever
80
79
/// they're used, making using them identical to simply replacing the name of the const with its
81
80
/// value. Static variables on the other hand point to a single location in memory, which all
@@ -89,7 +88,6 @@ mod as_keyword { }
89
88
///
90
89
/// For more detail on `const`, see the [Rust Book] or the [Reference]
91
90
///
92
- /// [`static`]: keyword.static.html
93
91
/// [pointer]: primitive.pointer.html
94
92
/// [Rust Book]:
95
93
/// https://doc.rust-lang.org/stable/book/2018-edition/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants
@@ -114,7 +112,7 @@ mod const_keyword { }
114
112
/// The `as` keyword can be used to change what the crate is referred to as in your project. If a
115
113
/// crate name includes a dash, it is implicitly imported with the dashes replaced by underscores.
116
114
///
117
- /// `crate` is also used as in conjunction with [ `pub`] to signify that the item it's attached to
115
+ /// `crate` is also used as in conjunction with `pub` to signify that the item it's attached to
118
116
/// is public only to other members of the same crate it's in.
119
117
///
120
118
/// ```rust
@@ -127,7 +125,6 @@ mod const_keyword { }
127
125
/// ```
128
126
///
129
127
/// [Reference]: https://doc.rust-lang.org/reference/items/extern-crates.html
130
- /// [`pub`]: keyword.pub.html
131
128
mod crate_keyword { }
132
129
133
130
#[ doc( keyword = "enum" ) ]
@@ -263,8 +260,6 @@ mod extern_keyword { }
263
260
/// }
264
261
/// ```
265
262
///
266
- /// See docs on [`impl`] and [`self`] for relevant details on those.
267
- ///
268
263
/// In addition to presenting fixed types in the form of `fn name(arg: type, ..) -> return_type`,
269
264
/// functions can also declare a list of type parameters along with trait bounds that they fall
270
265
/// into.
@@ -281,20 +276,17 @@ mod extern_keyword { }
281
276
/// }
282
277
/// ```
283
278
///
284
- /// Declaring trait bounds in the angle brackets is functionally identical to using a [ `where`]
279
+ /// Declaring trait bounds in the angle brackets is functionally identical to using a `where`
285
280
/// clause. It's up to the programmer to decide which works better in each situation, but `where`
286
281
/// tends to be better when things get longer than one line.
287
282
///
288
- /// Along with being made public via [ `pub`] , `fn` can also have an [`extern`] added for use in
283
+ /// Along with being made public via `pub`, `fn` can also have an [`extern`] added for use in
289
284
/// FFI.
290
285
///
291
286
/// For more information on the various types of functions and how they're used, consult the [Rust
292
287
/// book] or the [Reference].
293
288
///
294
289
/// [`impl`]: keyword.impl.html
295
- /// [`self`]: keyword.self.html
296
- /// [`where`]: keyword.where.html
297
- /// [`pub`]: keyword.pub.html
298
290
/// [`extern`]: keyword.extern.html
299
291
/// [Rust book]: https://doc.rust-lang.org/book/second-edition/ch03-03-how-functions-work.html
300
292
/// [Reference]: https://doc.rust-lang.org/reference/items/functions.html
@@ -307,7 +299,7 @@ mod fn_keyword { }
307
299
/// `for` is primarily used in for-in-loops, but it has a few other pieces of syntactic uses such as
308
300
/// `impl Trait for Type` (see [`impl`] for more info on that). for-in-loops, or to be more
309
301
/// precise, iterator loops, are a simple syntactic sugar over an exceedingly common practice
310
- /// within Rust, which is to loop over an iterator until that iterator returns None (or [ `break`]
302
+ /// within Rust, which is to loop over an iterator until that iterator returns None (or `break`
311
303
/// is called).
312
304
///
313
305
/// ```rust
@@ -365,7 +357,6 @@ mod fn_keyword { }
365
357
/// For more information on for-loops, see the [Rust book] or the [Reference].
366
358
///
367
359
/// [`impl`]: keyword.impl.html
368
- /// [`break`]: keyword.break.html
369
360
/// [`IntoIterator`]: iter/trait.IntoIterator.html
370
361
/// [Rust book]:
371
362
/// https://doc.rust-lang.org/book/2018-edition/ch03-05-control-flow.html#looping-through-a-collection-with-for
@@ -402,7 +393,7 @@ mod for_keyword { }
402
393
/// thing you'd see in many languages, with an optional `else` block. Second uses `if` as an
403
394
/// expression, which is only possible if all branches return the same type. An `if` expression can
404
395
/// be used everywhere you'd expect. The third kind of `if` block is an `if let` block, which
405
- /// behaves similarly to using a [ `match`] expression:
396
+ /// behaves similarly to using a `match` expression:
406
397
///
407
398
/// ```rust
408
399
/// if let Some(x) = Some(123) {
@@ -423,8 +414,6 @@ mod for_keyword { }
423
414
/// }
424
415
/// ```
425
416
///
426
- /// See [`let`] for more information on pattern bindings.
427
- ///
428
417
/// Each kind of `if` expression can be mixed and matched as needed.
429
418
///
430
419
/// ```rust
@@ -444,8 +433,6 @@ mod for_keyword { }
444
433
///
445
434
/// For more information on `if` expressions, see the [Rust book] or the [Reference].
446
435
///
447
- /// [`match`]: keyword.match.html
448
- /// [`let`]: keyword.let.html
449
436
/// [Rust book]:
450
437
/// https://doc.rust-lang.org/stable/book/2018-edition/ch03-05-control-flow.html#if-expressions
451
438
/// [Reference]: https://doc.rust-lang.org/reference/expressions/if-expr.html
0 commit comments