]> git.lizzy.rs Git - rust.git/commitdiff
docs: anchors fixes
authorSimon Mazur <semmaz.box@gmail.com>
Mon, 5 Oct 2015 16:25:54 +0000 (19:25 +0300)
committerSimon Mazur <semmaz.box@gmail.com>
Mon, 5 Oct 2015 16:25:54 +0000 (19:25 +0300)
src/doc/nomicon/lifetime-mismatch.md
src/doc/nomicon/repr-rust.md
src/doc/reference.md
src/doc/trpl/concurrency.md
src/doc/trpl/conditional-compilation.md
src/doc/trpl/dining-philosophers.md
src/doc/trpl/error-handling.md
src/doc/trpl/glossary.md

index 8b01616ee0d109efbf037b6f11dd593c42fee187..0ad8a78880e523306e293440bd40c5f8dd700991 100644 (file)
@@ -78,4 +78,4 @@ TODO: other common problems? SEME regions stuff, mostly?
 
 
 
-[ex2]: lifetimes.html#example-2:-aliasing-a-mutable-reference
+[ex2]: lifetimes.html#example-aliasing-a-mutable-reference
index e038ae5639bf6d3111d2a084f7dff52db0317ea4..85e17a9ce5b7ef29c060905403672c77cb7b527f 100644 (file)
@@ -151,4 +151,4 @@ use fairly elaborate algorithms to cache bits throughout nested types with
 special constrained representations. As such it is *especially* desirable that
 we leave enum layout unspecified today.
 
-[dst]: exotic-sizes.html#dynamically-sized-types-(dsts)
+[dst]: exotic-sizes.html#dynamically-sized-types-dsts
index 2fce37eccae1caa2e72460e1e68751e1b1cd3f99..aba7bed842e888730e822574c2764e5e1d4ae85f 100644 (file)
@@ -1997,7 +1997,7 @@ On `struct`s:
   list of names `#[macro_use(foo, bar)]` restricts the import to just those
   macros named.  The `extern crate` must appear at the crate root, not inside
   `mod`, which ensures proper function of the [`$crate` macro
-  variable](book/macros.html#the-variable-$crate).
+  variable](book/macros.html#the-variable-crate).
 
 - `macro_reexport` on an `extern crate` — re-export the named macros.
 
@@ -2007,7 +2007,7 @@ On `struct`s:
   link it into the output.
 
 See the [macros section of the
-book](book/macros.html#scoping-and-macro-import/export) for more information on
+book](book/macros.html#scoping-and-macro-importexport) for more information on
 macro scope.
 
 
@@ -2586,7 +2586,7 @@ Here are some examples:
 #### Moved and copied types
 
 When a [local variable](#variables) is used as an
-[rvalue](#lvalues,-rvalues-and-temporaries), the variable will be copied
+[rvalue](#lvalues-rvalues-and-temporaries), the variable will be copied
 if its type implements `Copy`. All others are moved.
 
 ### Literal expressions
@@ -2605,7 +2605,7 @@ value, or the unit value.
 ### Path expressions
 
 A [path](#paths) used as an expression context denotes either a local variable
-or an item. Path expressions are [lvalues](#lvalues,-rvalues-and-temporaries).
+or an item. Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
 
 ### Tuple expressions
 
@@ -2718,7 +2718,7 @@ foo().x;
 (Struct {a: 10, b: 20}).a;
 ```
 
-A field access is an [lvalue](#lvalues,-rvalues-and-temporaries) referring to
+A field access is an [lvalue](#lvalues-rvalues-and-temporaries) referring to
 the value of that field. When the type providing the field inherits mutability,
 it can be [assigned](#assignment-expressions) to.
 
@@ -2729,7 +2729,7 @@ fewer autoderefs to more.
 
 ### Array expressions
 
-An [array](#array,-and-slice-types) _expression_ is written by enclosing zero
+An [array](#array-and-slice-types) _expression_ is written by enclosing zero
 or more comma-separated expressions of uniform type in square brackets.
 
 In the `[expr ';' expr]` form, the expression after the `';'` must be a
@@ -2745,9 +2745,9 @@ constant expression that can be evaluated at compile time, such as a
 
 ### Index expressions
 
-[Array](#array,-and-slice-types)-typed expressions can be indexed by
+[Array](#array-and-slice-types)-typed expressions can be indexed by
 writing a square-bracket-enclosed expression (the index) after them. When the
-array is mutable, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can
+array is mutable, the resulting [lvalue](#lvalues-rvalues-and-temporaries) can
 be assigned to.
 
 Indices are zero-based, and may be of any integral type. Vector access is
@@ -2801,7 +2801,7 @@ before the expression they apply to.
 * `*`
   : Dereference. When applied to a [pointer](#pointer-types) it denotes the
     pointed-to location. For pointers to mutable locations, the resulting
-    [lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
+    [lvalue](#lvalues-rvalues-and-temporaries) can be assigned to.
     On non-pointer types, it calls the `deref` method of the `std::ops::Deref`
     trait, or the `deref_mut` method of the `std::ops::DerefMut` trait (if
     implemented by the type and required for an outer expression that will or
@@ -2942,8 +2942,8 @@ surprising side-effects on the dynamic execution semantics.
 #### Assignment expressions
 
 An _assignment expression_ consists of an
-[lvalue](#lvalues,-rvalues-and-temporaries) expression followed by an equals
-sign (`=`) and an [rvalue](#lvalues,-rvalues-and-temporaries) expression.
+[lvalue](#lvalues-rvalues-and-temporaries) expression followed by an equals
+sign (`=`) and an [rvalue](#lvalues-rvalues-and-temporaries) expression.
 
 Evaluating an assignment expression [either copies or
 moves](#moved-and-copied-types) its right-hand operand to its left-hand
@@ -3170,7 +3170,7 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the
 fields of a particular variant.
 
 A `match` behaves differently depending on whether or not the head expression
-is an [lvalue or an rvalue](#lvalues,-rvalues-and-temporaries). If the head
+is an [lvalue or an rvalue](#lvalues-rvalues-and-temporaries). If the head
 expression is an rvalue, it is first evaluated into a temporary location, and
 the resulting value is sequentially compared to the patterns in the arms until
 a match is found. The first arm with a matching pattern is chosen as the branch
@@ -3489,7 +3489,7 @@ enclosing `enum` or `struct` type itself. Such recursion has restrictions:
 
 * Recursive types must include a nominal type in the recursion
   (not mere [type definitions](grammar.html#type-definitions),
-   or other structural types such as [arrays](#array,-and-slice-types) or [tuples](#tuple-types)).
+   or other structural types such as [arrays](#array-and-slice-types) or [tuples](#tuple-types)).
 * A recursive `enum` item must have at least one non-recursive constructor
   (in order to give the recursion a basis case).
 * The size of a recursive type must be finite;
index 7028bade6deae557909b680cdbdf33cc707f4c1e..a17f3a5cae5cd7c869470cd31de915b7b4f19994 100644 (file)
@@ -53,7 +53,7 @@ For sharing references across threads, Rust provides a wrapper type called
 `Arc<T>`. `Arc<T>` implements `Send` and `Sync` if and only if `T` implements
 both `Send` and `Sync`. For example, an object of type `Arc<RefCell<U>>` cannot
 be transferred across threads because
-[`RefCell`](choosing-your-guarantees.html#refcell%3Ct%3E) does not implement
+[`RefCell`](choosing-your-guarantees.html#refcellt) does not implement
 `Sync`, consequently `Arc<RefCell<U>>` would not implement `Send`.
 
 These two traits allow you to use the type system to make strong guarantees
index a944b852d249fcc46f84658f9977d7b30e68861b..a6ff75db89b88ddccbefe9f1b315df47d9e14240 100644 (file)
@@ -34,7 +34,7 @@ These can nest arbitrarily:
 As for how to enable or disable these switches, if you’re using Cargo,
 they get set in the [`[features]` section][features] of your `Cargo.toml`:
 
-[features]: http://doc.crates.io/manifest.html#the-%5Bfeatures%5D-section
+[features]: http://doc.crates.io/manifest.html#the-features-section
 
 ```toml
 [features]
index 9539cd3447cb9f023bec1813c475871ea9da438b..8d2432f285e393c42daccba3b2f1c47dc13adb64 100644 (file)
@@ -434,7 +434,7 @@ ownership of the values it’s capturing. Primarily, the `p` variable of the
 
 Inside the thread, all we do is call `eat()` on `p`. Also note that the call to `thread::spawn` lacks a trailing semicolon, making this an expression. This distinction is important, yielding the correct return value. For more details, read [Expressions vs. Statements][es].
 
-[es]: functions.html#expressions-vs.-statements
+[es]: functions.html#expressions-vs-statements
 
 ```rust,ignore
 }).collect();
index c1fb112206eb83ff2144854016d4bd4ce59ed416..e538a40415dfdd523c9a4b28db9ec0c44b773712 100644 (file)
@@ -28,7 +28,7 @@ systems may want to jump around.
     * [The `Result` type](#the-result-type)
         * [Parsing integers](#parsing-integers)
         * [The `Result` type alias idiom](#the-result-type-alias-idiom)
-    * [A brief interlude: unwrapping isn't evil](#a-brief-interlude-unwrapping-isn't-evil)
+    * [A brief interlude: unwrapping isn't evil](#a-brief-interlude-unwrapping-isnt-evil)
 * [Working with multiple error types](#working-with-multiple-error-types)
     * [Composing `Option` and `Result`](#composing-option-and-result)
     * [The limits of combinators](#the-limits-of-combinators)
@@ -1470,7 +1470,7 @@ representation. But certainly, this will vary depending on use cases.
 At a minimum, you should probably implement the
 [`Error`](../std/error/trait.Error.html)
 trait. This will give users of your library some minimum flexibility for
-[composing errors](#the-real-try!-macro). Implementing the `Error` trait also
+[composing errors](#the-real-try-macro). Implementing the `Error` trait also
 means that users are guaranteed the ability to obtain a string representation
 of an error (because it requires impls for both `fmt::Debug` and
 `fmt::Display`).
index 6a5a45fdb2c4412893455999eacbd64aa119b5a8..106d225d2d08b95ae2854bf10e07ae4fdefbdec1 100644 (file)
@@ -42,7 +42,7 @@ In the example above `x` and `y` have arity 2. `z` has arity 3.
 
 A type without a statically known size or alignment. ([more info][link])
 
-[link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-(dsts)
+[link]: ../nomicon/exotic-sizes.html#dynamically-sized-types-dsts
 
 ### Expression