From 81a2299b115b658f8cc0843dfb200fd80b09bea9 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Tue, 7 Aug 2018 03:43:17 -0400 Subject: [PATCH 1/5] Move src/theme to theme mdbook 0.2.0 says that src/theme was accepted in error. --- book.toml | 2 +- {src/theme => theme}/header.hbs | 0 {src/theme => theme}/reference.css | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename {src/theme => theme}/header.hbs (100%) rename {src/theme => theme}/reference.css (100%) diff --git a/book.toml b/book.toml index 5dd755684..bfb49a4c0 100644 --- a/book.toml +++ b/book.toml @@ -4,5 +4,5 @@ title = "The Rust Reference" author = "The Rust Project Developers" [output.html] +additional-css = ["theme/reference.css"] -additional-css = ["src/theme/reference.css"] diff --git a/src/theme/header.hbs b/theme/header.hbs similarity index 100% rename from src/theme/header.hbs rename to theme/header.hbs diff --git a/src/theme/reference.css b/theme/reference.css similarity index 100% rename from src/theme/reference.css rename to theme/reference.css From 1492a9bcc6a1a2d6e78b0852c657b801460777c2 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Tue, 7 Aug 2018 04:29:12 -0400 Subject: [PATCH 2/5] Update links in nested directories. --- src/expressions/array-expr.md | 30 +++++++------- src/expressions/block-expr.md | 49 +++++++++++----------- src/expressions/call-expr.md | 12 +++--- src/expressions/closure-expr.md | 44 ++++++++++---------- src/expressions/enum-variant-expr.md | 10 ++--- src/expressions/field-expr.md | 23 ++++++----- src/expressions/grouped-expr.md | 8 ++-- src/expressions/if-expr.md | 12 +++--- src/expressions/literal-expr.md | 24 +++++------ src/expressions/loop-expr.md | 43 ++++++++----------- src/expressions/match-expr.md | 42 +++++++++---------- src/expressions/method-call-expr.md | 24 +++++------ src/expressions/operator-expr.md | 33 ++++++++------- src/expressions/path-expr.md | 14 +++---- src/expressions/range-expr.md | 15 ++++--- src/expressions/return-expr.md | 2 +- src/expressions/struct-expr.md | 34 +++++++-------- src/expressions/tuple-expr.md | 21 +++++----- src/items/associated-items.md | 62 +++++++++++++--------------- src/items/constant-items.md | 12 +++--- src/items/enumerations.md | 28 ++++++------- src/items/extern-crates.md | 14 +++---- src/items/external-blocks.md | 24 +++++------ src/items/functions.md | 60 +++++++++++++-------------- src/items/generics.md | 38 ++++++++--------- src/items/implementations.md | 40 +++++++++--------- src/items/modules.md | 24 +++++------ src/items/static-items.md | 14 +++---- src/items/structs.md | 19 ++++----- src/items/traits.md | 62 ++++++++++++++-------------- src/items/type-aliases.md | 10 ++--- src/items/unions.md | 8 ++-- src/items/use-declarations.md | 20 +++++---- src/types/array.md | 8 ++-- src/types/closure.md | 20 ++++----- src/types/enum.md | 4 +- src/types/function-item.md | 18 ++++---- src/types/function-pointer.md | 20 ++++----- src/types/impl-trait.md | 4 +- src/types/pointer.md | 12 +++--- src/types/slice.md | 4 +- src/types/struct.md | 4 +- src/types/textual.md | 2 +- src/types/trait-object.md | 14 +++---- src/types/tuple.md | 2 +- src/types/union.md | 4 +- 46 files changed, 491 insertions(+), 500 deletions(-) diff --git a/src/expressions/array-expr.md b/src/expressions/array-expr.md index 7506934dd..f23c148b4 100644 --- a/src/expressions/array-expr.md +++ b/src/expressions/array-expr.md @@ -10,19 +10,19 @@ >       [_Expression_] ( `,` [_Expression_] )\* `,`?\ >    | [_Expression_] `;` [_Expression_] -An _[array](types/array.html) expression_ can be written by +An _[array] expression_ can be written by enclosing zero or more comma-separated expressions of uniform type in square brackets. This produces and array containing each of these values in the order they are written. Alternatively there can be exactly two expressions inside the brackets, separated by a semi-colon. The expression after the `;` must be a have type -`usize` and be a [constant expression], -such as a [literal](tokens.html#literals) or a [constant -item](items/constant-items.html). `[a; b]` creates an array containing `b` +`usize` and be a [constant expression], such as a +[literal](../tokens.html#literals) or a [constant +item](../items/constant-items.html). `[a; b]` creates an array containing `b` copies of the value of `a`. If the expression after the semi-colon has a value greater than 1 then this requires that the type of `a` is -[`Copy`](special-types-and-traits.html#copy). +[`Copy`](../special-types-and-traits.html#copy). ```rust [1, 2, 3, 4]; @@ -42,9 +42,8 @@ expressions]. > **Syntax**\ > _IndexExpression_ :\ ->    [_Expression_] `[` [_Expression_] `]` -[Array](types/array.html) and [slice](types/slice.html)-typed expressions can be +[Array][array] and [slice](../types/slice.html)-typed expressions can be indexed by writing a square-bracket-enclosed expression of type `usize` (the index) after them. When the array is mutable, the resulting [memory location] can be assigned to. @@ -81,11 +80,12 @@ arr[10]; // warning: index out of bounds The array index expression can be implemented for types other than arrays and slices by implementing the [Index] and [IndexMut] traits. -[IndexMut]: ../std/ops/trait.IndexMut.html -[Index]: ../std/ops/trait.Index.html -[Inner attributes]: attributes.html -[_Expression_]: expressions.html -[_InnerAttribute_]: attributes.html -[attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions -[constant expression]: const_eval.html#constant-expressions -[memory location]: expressions.html#place-expressions-and-value-expressions +[array]: ../types/array.html +[IndexMut]: ../../std/ops/trait.IndexMut.html +[Index]: ../../std/ops/trait.Index.html +[Inner attributes]: ../attributes.html +[_Expression_]: ../expressions.html +[_InnerAttribute_]: ../attributes.html +[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions +[constant expression]: ../const_eval.html#constant-expressions +[memory location]: ../expressions.html#place-expressions-and-value-expressions diff --git a/src/expressions/block-expr.md b/src/expressions/block-expr.md index d1cb9affe..a6375ef17 100644 --- a/src/expressions/block-expr.md +++ b/src/expressions/block-expr.md @@ -86,7 +86,8 @@ fn move_by_block_expression() { > _UnsafeBlockExpression_ :\ >    `unsafe` _BlockExpression_ -_See [`unsafe` block](unsafe-blocks.html) for more information on when to use `unsafe`_ +_See [`unsafe` block](../unsafe-blocks.html) for more information on when to use +`unsafe`_ A block of code can be prefixed with the `unsafe` keyword to permit [unsafe operations]. Examples: @@ -129,26 +130,26 @@ fn is_unix_platform() -> bool { } ``` -[_ExpressionWithoutBlock_]: expressions.html -[_InnerAttribute_]: attributes.html -[_Statement_]: statements.html -[`cfg`]: conditional-compilation.html -[`for`]: expressions/loop-expr.html#iterator-loops -[`loop`]: expressions/loop-expr.html#infinite-loops -[`while let`]: expressions/loop-expr.html#predicate-pattern-loops -[`while`]: expressions/loop-expr.html#predicate-loops -[array expressions]: expressions/array-expr.html -[call expressions]: expressions/call-expr.html -[enum variant]: expressions/enum-variant-expr.html -[expression attributes]: expressions.html#expression-attributes -[expression]: expressions.html -[function]: items/functions.html -[inner attributes]: attributes.html -[method]: items/associated-items.html#methods -[statement]: statements.html -[statements]: statements.html -[struct]: expressions/struct-expr.html -[the lint check attributes]: attributes.html#lint-check-attributes -[tuple expressions]: expressions/tuple-expr.html -[unsafe operations]: unsafety.html -[value expressions]: expressions.html#place-expressions-and-value-expressions +[_ExpressionWithoutBlock_]: ../expressions.html +[_InnerAttribute_]: ../attributes.html +[_Statement_]: ../statements.html +[`cfg`]: ../conditional-compilation.html +[`for`]: ../expressions/loop-expr.html#iterator-loops +[`loop`]: ../expressions/loop-expr.html#infinite-loops +[`while let`]: ../expressions/loop-expr.html#predicate-pattern-loops +[`while`]: ../expressions/loop-expr.html#predicate-loops +[array expressions]: ../expressions/array-expr.html +[call expressions]: ../expressions/call-expr.html +[enum variant]: ../expressions/enum-variant-expr.html +[expression attributes]: ../expressions.html#expression-attributes +[expression]: ../expressions.html +[function]: ../items/functions.html +[inner attributes]: ../attributes.html +[method]: ../items/associated-items.html#methods +[statement]: ../statements.html +[statements]: ../statements.html +[struct]: ../expressions/struct-expr.html +[the lint check attributes]: ../attributes.html#lint-check-attributes +[tuple expressions]: ../expressions/tuple-expr.html +[unsafe operations]: ../unsafety.html +[value expressions]: ../expressions.html#place-expressions-and-value-expressions diff --git a/src/expressions/call-expr.md b/src/expressions/call-expr.md index 9f3414a45..eb1172f20 100644 --- a/src/expressions/call-expr.md +++ b/src/expressions/call-expr.md @@ -10,7 +10,7 @@ A _call expression_ consists of an expression followed by a parenthesized expression-list. It invokes a function, providing zero or more input variables. If the function eventually returns, then the expression completes. For -[non-function types](types/function-item.html), the expression f(...) uses +[non-function types](../types/function-item.html), the expression f(...) uses the method on one of the [`std::ops::Fn`], [`std::ops::FnMut`] or [`std::ops::FnOnce`] traits, which differ in whether they take the type by reference, mutable reference, or take ownership respectively. An automatic @@ -93,9 +93,9 @@ fn main() { Refer to [RFC 132] for further details and motivations. -[`std::ops::Fn`]: ../std/ops/trait.Fn.html -[`std::ops::FnMut`]: ../std/ops/trait.FnMut.html -[`std::ops::FnOnce`]: ../std/ops/trait.FnOnce.html +[`std::ops::Fn`]: ../../std/ops/trait.Fn.html +[`std::ops::FnMut`]: ../../std/ops/trait.FnMut.html +[`std::ops::FnOnce`]: ../../std/ops/trait.FnOnce.html [RFC 132]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md - -[_Expression_]: expressions.html +[non-function types]: ../types.html#function-item-types +[_Expression_]: ../expressions.html diff --git a/src/expressions/closure-expr.md b/src/expressions/closure-expr.md index e61d67f98..8b8d1a236 100644 --- a/src/expressions/closure-expr.md +++ b/src/expressions/closure-expr.md @@ -31,20 +31,21 @@ functions, as an abbreviation for defining and capturing a separate function. Significantly, closure expressions _capture their environment_, which regular [function definitions] do not. Without the `move` keyword, the closure expression -[infers how it captures each variable from its environment](types/closure.html#capture-modes), -preferring to capture by shared reference, effectively borrowing -all outer variables mentioned inside the closure's body. If needed the compiler -will infer that instead mutable references should be taken, or that the values -should be moved or copied (depending on their type) from the environment. A -closure can be forced to capture its environment by copying or moving values by -prefixing it with the `move` keyword. This is often used to ensure that the +[infers how it captures each variable from its +environment](../types/closure.html#capture-modes), preferring to capture by shared +reference, effectively borrowing all outer variables mentioned inside the +closure's body. If needed the compiler will infer that instead mutable +references should be taken, or that the values should be moved or copied +(depending on their type) from the environment. A closure can be forced to +capture its environment by copying or moving values by prefixing it with the +`move` keyword. This is often used to ensure that the closure's type is `'static`. The compiler will determine which of the [closure -traits](types/closure.html#call-traits-and-coercions) the closure's type will implement by how it -acts on its captured variables. The closure will also implement -[`Send`](special-types-and-traits.html#send) and/or -[`Sync`](special-types-and-traits.html#sync) if all of its captured types do. +traits](../types/closure.html#call-traits-and-coercions) the closure's type will +implement by how it acts on its captured variables. The closure will also +implement [`Send`](../special-types-and-traits.html#send) and/or +[`Sync`](../special-types-and-traits.html#sync) if all of its captured types do. These traits allow functions to accept closures using generics, even though the exact types can't be named. @@ -67,14 +68,13 @@ let word = "konnichiwa".to_owned(); ten_times(move |j| println!("{}, {}", word, j)); ``` -[block]: expressions/block-expr.html -[function definitions]: items/functions.html -[patterns]: patterns.html - -[_Expression_]: expressions.html -[_BlockExpression_]: expressions/block-expr.html -[_TypeNoBounds_]: types.html#type-expressions -[_FunctionParameters_]: items/functions.html -[_Pattern_]: patterns.html -[_Type_]: types.html#type-expressions -[`let` binding]: statements.html#let-statements +[block]: ../expressions/block-expr.html +[function definitions]: ../items/functions.html +[patterns]: ../patterns.html +[_Expression_]: ../expressions.html +[_BlockExpression_]: ../expressions/block-expr.html +[_TypeNoBounds_]: ../types.html#type-expressions +[_FunctionParameters_]: ../items/functions.html +[_Pattern_]: ../patterns.html +[_Type_]: ../types.html#type-expressions +[`let` binding]: ../statements.html#let-statements diff --git a/src/expressions/enum-variant-expr.md b/src/expressions/enum-variant-expr.md index 39d3a0ab1..21ae98a21 100644 --- a/src/expressions/enum-variant-expr.md +++ b/src/expressions/enum-variant-expr.md @@ -40,8 +40,8 @@ let m = Message::Move { x: 50, y: 200 }; Enum variant expressions have the same syntax, behavior, and restrictions as [struct expressions][structs], except they do not support base update with the `..` syntax. -[IDENTIFIER]: identifiers.html -[TUPLE_INDEX]: tokens.html#integer-literals -[_Expression_]: expressions.html -[_PathInExpression_]: paths.html#paths-in-expressions -[structs]: expressions/struct-expr.html +[IDENTIFIER]: ../identifiers.html +[TUPLE_INDEX]: ../tokens.html#integer-literals +[_Expression_]: ../expressions.html +[_PathInExpression_]: ../paths.html#paths-in-expressions +[structs]: ../expressions/struct-expr.html diff --git a/src/expressions/field-expr.md b/src/expressions/field-expr.md index 043d7b4fb..598fb3d7f 100644 --- a/src/expressions/field-expr.md +++ b/src/expressions/field-expr.md @@ -26,10 +26,10 @@ automatically dereferenced as many times as necessary to make the field access possible. In cases of ambiguity, we prefer fewer autoderefs to more. Finally, the fields of a struct or a reference to a struct are treated as -separate entities when borrowing. If the struct does not implement -[`Drop`](special-types-and-traits.html#drop) and is stored in a local variable, -this also applies to moving out of each of its fields. This also does not apply -if automatic dereferencing is done though user defined types. +separate entities when borrowing. If the struct does not implement [`Drop`] and +is stored in a local variable, this also applies to moving out of each of its +fields. This also does not apply if automatic dereferencing is done though user +defined types. ```rust struct A { f1: String, f2: String, f3: String } @@ -45,10 +45,11 @@ let c: &String = &x.f2; // Can borrow again let d: String = x.f3; // Move out of x.f3 ``` -[_Expression_]: expressions.html -[IDENTIFIER]: identifiers.html -[method call expression]: expressions/method-call-expr.html -[struct]: items/structs.html -[union]: items/unions.html -[place expression]: expressions.html#place-expressions-and-value-expressions -[mutable]: expressions.html#mutability +[_Expression_]: ../expressions.html +[IDENTIFIER]: ../identifiers.html +[method call expression]: ../expressions/method-call-expr.html +[struct]: ../items/structs.html +[union]: ../items/unions.html +[place expression]: ../expressions.html#place-expressions-and-value-expressions +[mutable]: ../expressions.html#mutability +[`Drop`]: ../special-types-and-traits.html#drop diff --git a/src/expressions/grouped-expr.md b/src/expressions/grouped-expr.md index c5845d2ad..fe19ed3d2 100644 --- a/src/expressions/grouped-expr.md +++ b/src/expressions/grouped-expr.md @@ -41,7 +41,7 @@ assert_eq!((a.f)(), "The field f"); group expression in the same expression contexts as [attributes on block expressions]. -[Inner attributes]: attributes.html -[_Expression_]: expressions.html -[_InnerAttribute_]: attributes.html -[attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions +[Inner attributes]: ../attributes.html +[_Expression_]: ../expressions.html +[_InnerAttribute_]: ../attributes.html +[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions diff --git a/src/expressions/if-expr.md b/src/expressions/if-expr.md index 5501dc86f..d29f5520a 100644 --- a/src/expressions/if-expr.md +++ b/src/expressions/if-expr.md @@ -149,10 +149,10 @@ if let PAT = EXPR || EXPR { .. } if let PAT = ( EXPR || EXPR ) { .. } ``` -[_BlockExpression_]: expressions/block-expr.html -[_Expression_]: expressions.html -[_LazyBooleanOperatorExpression_]: expressions/operator-expr.html#lazy-boolean-operators -[_MatchArmPatterns_]: expressions/match-expr.html +[_BlockExpression_]: ../expressions/block-expr.html +[_Expression_]: ../expressions.html +[_LazyBooleanOperatorExpression_]: ../expressions/operator-expr.html#lazy-boolean-operators +[_MatchArmPatterns_]: ../expressions/match-expr.html [_eRFCIfLetChain_]: https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md#rollout-plan-and-transitioning-to-rust-2018 -[`match` expression]: expressions/match-expr.html -[scrutinee]: glossary.html#scrutinee +[`match` expression]: ../expressions/match-expr.html +[scrutinee]: ../glossary.html#scrutinee diff --git a/src/expressions/literal-expr.md b/src/expressions/literal-expr.md index 26ccda81a..f6b6b0f2a 100644 --- a/src/expressions/literal-expr.md +++ b/src/expressions/literal-expr.md @@ -12,9 +12,8 @@ >    | [FLOAT_LITERAL]\ >    | [BOOLEAN_LITERAL] -A _literal expression_ consists of one of the [literal](tokens.html#literals) -forms described earlier. It directly describes a number, character, string, -or boolean value. +A _literal expression_ consists of one of the [literal] forms described earlier. +It directly describes a number, character, string, or boolean value. ```rust "hello"; // string type @@ -22,12 +21,13 @@ or boolean value. 5; // integer type ``` -[CHAR_LITERAL]: tokens.html#character-literals -[STRING_LITERAL]: tokens.html#string-literals -[RAW_STRING_LITERAL]: tokens.html#raw-string-literals -[BYTE_LITERAL]: tokens.html#byte-literals -[BYTE_STRING_LITERAL]: tokens.html#byte-string-literals -[RAW_BYTE_STRING_LITERAL]: tokens.html#raw-byte-string-literals -[INTEGER_LITERAL]: tokens.html#integer-literals -[FLOAT_LITERAL]: tokens.html#floating-point-literals -[BOOLEAN_LITERAL]: tokens.html#boolean-literals +[CHAR_LITERAL]: ../tokens.html#character-literals +[STRING_LITERAL]: ../tokens.html#string-literals +[RAW_STRING_LITERAL]: ../tokens.html#raw-string-literals +[BYTE_LITERAL]: ../tokens.html#byte-literals +[BYTE_STRING_LITERAL]: ../tokens.html#byte-string-literals +[RAW_BYTE_STRING_LITERAL]: ../tokens.html#raw-byte-string-literals +[INTEGER_LITERAL]: ../tokens.html#integer-literals +[FLOAT_LITERAL]: ../tokens.html#floating-point-literals +[BOOLEAN_LITERAL]: ../tokens.html#boolean-literals +[literal]: ../tokens.html#literals diff --git a/src/expressions/loop-expr.md b/src/expressions/loop-expr.md index 7a2ae1863..c7f9320de 100644 --- a/src/expressions/loop-expr.md +++ b/src/expressions/loop-expr.md @@ -9,12 +9,6 @@ >       | [_IteratorLoopExpression_]\ >    ) -[_LoopLabel_]: #loop-labels -[_InfiniteLoopExpression_]: #infinite-loops -[_PredicateLoopExpression_]: #predicate-loops -[_PredicatePatternLoopExpression_]: #predicate-pattern-loops -[_IteratorLoopExpression_]: #iterator-loops - Rust supports four loop expressions: * A [`loop` expression](#infinite-loops) denotes an infinite loop. @@ -23,9 +17,9 @@ Rust supports four loop expressions: * A [`for` expression](#iterator-loops) extracts values from an iterator, looping until the iterator is empty. -All four types of loop support [`break` expressions](#break-expressions), -[`continue` expressions](#continue-expressions), and [labels](#loop-labels). -Only `loop` supports [evaluation to non-trivial values](#break-and-loop-values). +All four types of loop support [`break` expressions], +[`continue` expressions], and [labels]. +Only `loop` supports [evaluation to non-trivial values][loop values]. ## Infinite loops @@ -37,9 +31,9 @@ A `loop` expression repeats execution of its body continuously: `loop { println!("I live."); }`. A `loop` expression without an associated `break` expression is diverging and -has type [`!`](types/never.html). A `loop` expression containing -associated [`break` expression(s)](#break-expressions) may terminate, and must -have type compatible with the value of the `break` expression(s). +has type [`!`](../types/never.html). A `loop` expression containing associated +[`break` expression(s)](#break-expressions) may terminate, and must have type +compatible with the value of the `break` expression(s). ## Predicate loops @@ -202,8 +196,7 @@ a lifetime preceding the loop expression, as in `'foo: loop { break 'foo; }`, `'bar: while false {}`, `'humbug: for _ in 0..0 {}`. If a label is present, then labeled `break` and `continue` expressions nested within this loop may exit out of this loop or return control to its head. -See [break expressions](#break-expressions) and [continue -expressions](#continue-expressions). +See [break expressions] and [continue expressions]. ## `break` expressions @@ -226,7 +219,7 @@ assert_eq!(last, 12); ``` A `break` expression is normally associated with the innermost `loop`, `for` or -`while` loop enclosing the `break` expression, but a [label](#loop-labels) can +`while` loop enclosing the `break` expression, but a [label][labels] can be used to specify which enclosing loop is affected. Example: ```rust @@ -238,7 +231,7 @@ be used to specify which enclosing loop is affected. Example: ``` A `break` expression is only permitted in the body of a loop, and has one of -the forms `break`, `break 'label` or ([see below](#break-and-loop-values)) +the forms `break`, `break 'label` or ([see below][loop values]) `break EXPR` or `break 'label EXPR`. ## `continue` expressions @@ -282,12 +275,12 @@ and the `loop` must have a type compatible with each `break` expression. `break` without an expression is considered identical to `break` with expression `()`. -[IDENTIFIER]: identifiers.html -[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels -[_BlockExpression_]: expressions/block-expr.html -[_Expression_]: expressions.html -[_MatchArmPatterns_]: expressions/match-expr.html -[_Pattern_]: patterns.html -[`match` expression]: expressions/match-expr.html -[scrutinee]: glossary.html#scrutinee -[temporary values]: expressions.html#temporary-lifetimes +[IDENTIFIER]: ../identifiers.html +[LIFETIME_OR_LABEL]: ../tokens.html#lifetimes-and-loop-labels +[_BlockExpression_]: ../expressions/block-expr.html +[_Expression_]: ../expressions.html +[_MatchArmPatterns_]: ../expressions/match-expr.html +[_Pattern_]: ../patterns.html +[`match` expression]: ../expressions/match-expr.html +[scrutinee]: ../glossary.html#scrutinee +[temporary values]: ../expressions.html#temporary-lifetimes diff --git a/src/expressions/match-expr.md b/src/expressions/match-expr.md index d032a3fcc..eede6fc71 100644 --- a/src/expressions/match-expr.md +++ b/src/expressions/match-expr.md @@ -134,24 +134,24 @@ meaning on match arms are [`cfg`], `cold`, and the [lint check attributes]. expression in the same expression contexts as [attributes on block expressions]. -[_Expression_]: expressions.html -[_BlockExpression_]: expressions/block-expr.html#block-expressions -[place expression]: expressions.html#place-expressions-and-value-expressions -[value expression]: expressions.html#place-expressions-and-value-expressions -[_InnerAttribute_]: attributes.html -[_OuterAttribute_]: attributes.html -[`cfg`]: conditional-compilation.html -[lint check attributes]: attributes.html#lint-check-attributes -[Range Expression]: expressions/range-expr.html - -[_Pattern_]: patterns.html -[pattern]: patterns.html -[Identifier Patterns]: patterns.html#identifier-patterns -[Inner attributes]: attributes.html -[Struct Patterns]: patterns.html#struct-patterns -[Tuple Struct Patterns]: patterns.html#tuplestruct-patterns -[Tuple Patterns]: patterns.html#tuple-patterns -[Range Pattern]: patterns.html#range-patterns -[attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions -[binding mode]: patterns.html#binding-modes -[scrutinee]: glossary.html#scrutinee +[_Expression_]: ../expressions.html +[_BlockExpression_]: ../expressions/block-expr.html#block-expressions +[place expression]: ../expressions.html#place-expressions-and-value-expressions +[value expression]: ../expressions.html#place-expressions-and-value-expressions +[_InnerAttribute_]: ../attributes.html +[_OuterAttribute_]: ../attributes.html +[`cfg`]: ../conditional-compilation.html +[lint check attributes]: ../attributes.html#lint-check-attributes +[Range Expression]: ../expressions/range-expr.html + +[_Pattern_]: ../patterns.html +[pattern]: ../patterns.html +[Identifier Patterns]: ../patterns.html#identifier-patterns +[Inner attributes]: ../attributes.html +[Struct Patterns]: ../patterns.html#struct-patterns +[Tuple Struct Patterns]: ../patterns.html#tuplestruct-patterns +[Tuple Patterns]: ../patterns.html#tuple-patterns +[Range Pattern]: ../patterns.html#range-patterns +[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions +[binding mode]: ../patterns.html#binding-modes +[scrutinee]: ../glossary.html#scrutinee diff --git a/src/expressions/method-call-expr.md b/src/expressions/method-call-expr.md index fd150c352..1ee863be2 100644 --- a/src/expressions/method-call-expr.md +++ b/src/expressions/method-call-expr.md @@ -9,7 +9,7 @@ dot, an expression path segment, and a parenthesized expression-list. Method cal resolved to associated [methods] on specific traits, either statically dispatching to a method if the exact `self`-type of the left-hand-side is known, or dynamically dispatching if the left-hand-side expression is an indirect -[trait object](types/trait-object.html). +[trait object](../types/trait-object.html). ```rust let pi: Result = "3.14".parse(); @@ -97,14 +97,14 @@ method and you'll be fine. -[_CallParams_]: expressions/call-expr.html -[_Expression_]: expressions.html -[_PathExprSegment_]: paths.html#paths-in-expressions -[visible]: visibility-and-privacy.html -[array]: types/array.html -[trait objects]: types/trait-object.html -[disambiguate call]: expressions/call-expr.html#disambiguating-function-calls -[disambiguating function call syntax]: expressions/call-expr.html#disambiguating-function-calls -[dereference]: expressions/operator-expr.html#the-dereference-operator -[methods]: items/associated-items.html#methods -[unsized coercion]: type-coercions.html#unsized-coercions +[_CallParams_]: ../expressions/call-expr.html +[_Expression_]: ../expressions.html +[_PathExprSegment_]: ../paths.html#paths-in-expressions +[visible]: ../visibility-and-privacy.html +[array]: ../types/array.html +[trait objects]: ../types/trait-object.html +[disambiguate call]: ../expressions/call-expr.html#disambiguating-function-calls +[disambiguating function call syntax]: ../expressions/call-expr.html#disambiguating-function-calls +[dereference]: ../expressions/operator-expr.html#the-dereference-operator +[methods]: ../items/associated-items.html#methods +[unsized coercion]: ../type-coercions.html#unsized-coercions diff --git a/src/expressions/operator-expr.md b/src/expressions/operator-expr.md index 05468277d..ca251f9b9 100644 --- a/src/expressions/operator-expr.md +++ b/src/expressions/operator-expr.md @@ -85,14 +85,14 @@ let a = & & & & mut 10; >    `*` [_Expression_] The `*` (dereference) operator is also a unary prefix operator. When applied to -a [pointer](types/pointer.html) it denotes the pointed-to location. If +a [pointer](../types/pointer.html) it denotes the pointed-to location. If the expression is of type `&mut T` and `*mut T`, and is either a local variable, a (nested) field of a local variable or is a mutable [place expression], then the resulting memory location can be assigned to. Dereferencing a raw pointer requires `unsafe`. On non-pointer types `*x` is equivalent to `*std::ops::Deref::deref(&x)` in an -[immutable place expression context](expressions.html#mutability) and +[immutable place expression context](../expressions.html#mutability) and `*std::ops::Deref::deref_mut(&mut x)` in a mutable place expression context. ```rust @@ -331,7 +331,7 @@ fn average(values: &[f64]) -> f64 { } ``` -`as` can be used to explicitly perform [coercions](type-coercions.html), as +`as` can be used to explicitly perform [coercions](../type-coercions.html), as well as the following additional casts. Here `*T` means either `*const T` or `*mut T`. @@ -345,7 +345,7 @@ well as the following additional casts. Here `*T` means either `*const T` or | `*T` where `T: Sized` | Numeric type | Pointer to address cast | | Integer type | `*V` where `V: Sized` | Address to pointer cast | | `&[T; n]` | `*const T` | Array to pointer cast | -| [Function pointer](types/function-pointer.html) | `*V` where `V: Sized` | Function pointer to pointer cast | +| [Function pointer](../types/function-pointer.html) | `*V` where `V: Sized` | Function pointer to pointer cast | | Function pointer | Integer | Function pointer to address cast | | Closure \*\* | Function pointer | Closure to function pointer cast | @@ -398,12 +398,13 @@ An _assignment expression_ consists of a [place expression] followed by an equals sign (`=`) and a [value expression]. Such an expression always has the [`unit` type]. -Evaluating an assignment expression [drops](destructors.html) the left-hand -operand, unless it's an uninitialized local variable or field of a local variable, -and [either copies or moves](expressions.html#moved-and-copied-types) its -right-hand operand to its left-hand operand. The left-hand operand must be a -place expression: using a value expression results in a compiler error, rather -than promoting it to a temporary. +Evaluating an assignment expression [drops](../destructors.html) the left-hand +operand, unless it's an uninitialized local variable or field of a local +variable, and [either copies or +moves](../expressions.html#moved-and-copied-types) its right-hand operand to its +left-hand operand. The left-hand operand must be a place expression: using a +value expression results in a compiler error, rather than promoting it to a +temporary. ```rust # let mut x = 0; @@ -441,12 +442,12 @@ x += 4; assert_eq!(x, 14); ``` -[place expression]: expressions.html#place-expressions-and-value-expressions -[value expression]: expressions.html#place-expressions-and-value-expressions -[temporary value]: expressions.html#temporary-lifetimes +[place expression]: ../expressions.html#place-expressions-and-value-expressions +[value expression]: ../expressions.html#place-expressions-and-value-expressions +[temporary value]: ../expressions.html#temporary-lifetimes [float-int]: https://github.com/rust-lang/rust/issues/10184 [float-float]: https://github.com/rust-lang/rust/issues/15536 -[`unit` type]: types/tuple.html +[`unit` type]: ../types/tuple.html [_BorrowExpression_]: #borrow-operators [_DereferenceExpression_]: #the-dereference-operator @@ -459,5 +460,5 @@ assert_eq!(x, 14); [_AssignmentExpression_]: #assignment-expressions [_CompoundAssignmentExpression_]: #compound-assignment-expressions -[_Expression_]: expressions.html -[_TypeNoBounds_]: types.html#type-expressions +[_Expression_]: ../expressions.html +[_TypeNoBounds_]: ../types.html#type-expressions diff --git a/src/expressions/path-expr.md b/src/expressions/path-expr.md index fdf019d1a..7466aab97 100644 --- a/src/expressions/path-expr.md +++ b/src/expressions/path-expr.md @@ -24,10 +24,10 @@ let push_integer = Vec::::push; let slice_reverse = <[i32]>::reverse; ``` -[_PathInExpression_]: paths.html#paths-in-expressions -[_QualifiedPathInExpression_]: paths.html#qualified-paths -[place expressions]: expressions.html#place-expressions-and-value-expressions -[value expressions]: expressions.html#place-expressions-and-value-expressions -[path]: paths.html -[`static mut`]: items/static-items.html#mutable-statics -[`unsafe` block]: expressions/block-expr.html#unsafe-blocks +[_PathInExpression_]: ../paths.html#paths-in-expressions +[_QualifiedPathInExpression_]: ../paths.html#qualified-paths +[place expressions]: ../expressions.html#place-expressions-and-value-expressions +[value expressions]: ../expressions.html#place-expressions-and-value-expressions +[path]: ../paths.html +[`static mut`]: ../items/static-items.html#mutable-statics +[`unsafe` block]: ../expressions/block-expr.html#unsafe-blocks diff --git a/src/expressions/range-expr.md b/src/expressions/range-expr.md index 4f478c373..74e789557 100644 --- a/src/expressions/range-expr.md +++ b/src/expressions/range-expr.md @@ -68,11 +68,10 @@ for i in 1..11 { } ``` -[_Expression_]: expressions.html - -[std::ops::Range]: https://doc.rust-lang.org/std/ops/struct.Range.html -[std::ops::RangeFrom]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html -[std::ops::RangeTo]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html -[std::ops::RangeFull]: https://doc.rust-lang.org/std/ops/struct.RangeFull.html -[std::ops::RangeInclusive]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html -[std::ops::RangeToInclusive]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html +[_Expression_]: ../expressions.html +[std::ops::Range]: ../../std/ops/struct.Range.html +[std::ops::RangeFrom]: ../../std/ops/struct.RangeFrom.html +[std::ops::RangeTo]: ../../std/ops/struct.RangeTo.html +[std::ops::RangeFull]: ../../std/ops/struct.RangeFull.html +[std::ops::RangeInclusive]: ../../std/ops/struct.RangeInclusive.html +[std::ops::RangeToInclusive]: ../../std/ops/struct.RangeToInclusive.html diff --git a/src/expressions/return-expr.md b/src/expressions/return-expr.md index 77cfb3594..ba6ac2c4d 100644 --- a/src/expressions/return-expr.md +++ b/src/expressions/return-expr.md @@ -20,4 +20,4 @@ fn max(a: i32, b: i32) -> i32 { } ``` -[_Expression_]: expressions.html +[_Expression_]: ../expressions.html diff --git a/src/expressions/struct-expr.md b/src/expressions/struct-expr.md index ac278eb0b..a045377a1 100644 --- a/src/expressions/struct-expr.md +++ b/src/expressions/struct-expr.md @@ -138,21 +138,21 @@ let b = Gamma{}; // Exact same value as `a`. of a struct expression in the same expression contexts as [attributes on block expressions]. -[IDENTIFIER]: identifiers.html -[Inner attributes]: attributes.html -[TUPLE_INDEX]: tokens.html#integer-literals -[_Expression_]: expressions.html -[_InnerAttribute_]: attributes.html -[_PathInExpression_]: paths.html#paths-in-expressions -[attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions -[call expression]: expressions/call-expr.html -[if let]: expressions/if-expr.html#if-let-expressions -[if]: expressions/if-expr.html#if-expressions -[loop]: expressions/loop-expr.html -[match]: expressions/match-expr.html +[IDENTIFIER]: ../identifiers.html +[Inner attributes]: ../attributes.html +[TUPLE_INDEX]: ../tokens.html#integer-literals +[_Expression_]: ../expressions.html +[_InnerAttribute_]: ../attributes.html +[_PathInExpression_]: ../paths.html#paths-in-expressions +[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions +[call expression]: ../expressions/call-expr.html +[if let]: ../expressions/if-expr.html#if-let-expressions +[if]: ../expressions/if-expr.html#if-expressions +[loop]: ../expressions/loop-expr.html +[match]: ../expressions/match-expr.html [parentheses]: http://localhost:3000/expressions/grouped-expr.html -[path]: paths.html -[struct]: items/structs.html -[union]: items/unions.html -[visible]: visibility-and-privacy.html -[scrutinee]: glossary.html#scrutinee +[path]: ../paths.html +[struct]: ../items/structs.html +[union]: ../items/unions.html +[visible]: ../visibility-and-privacy.html +[scrutinee]: ../glossary.html#scrutinee diff --git a/src/expressions/tuple-expr.md b/src/expressions/tuple-expr.md index 68bc9f438..e92ff85e4 100644 --- a/src/expressions/tuple-expr.md +++ b/src/expressions/tuple-expr.md @@ -10,8 +10,7 @@ >    ( [_Expression_] `,` )+ [_Expression_]? Tuples are written by enclosing zero or more comma-separated expressions in -parentheses. They are used to create [tuple-typed](types/tuple.html) -values. +parentheses. They are used to create [tuple-typed](../types/tuple.html) values. ```rust (0.0, 4.5); @@ -39,12 +38,12 @@ expressions]. > _TupleIndexingExpression_ :\ >    [_Expression_] `.` [TUPLE_INDEX] -[Tuples](types/tuple.html) and [struct tuples](items/structs.html) can be +[Tuples](../types/tuple.html) and [struct tuples](../items/structs.html) can be indexed using the number corresponding to the position of the field. The index -must be written as a [decimal literal](tokens.html#integer-literals) with no +must be written as a [decimal literal](../tokens.html#integer-literals) with no underscores or suffix. Tuple indexing expressions also differ from field -expressions in that they can unambiguously be called as a function. In all -other aspects they have the same behavior. +expressions in that they can unambiguously be called as a function. In all other +aspects they have the same behavior. ```rust # struct Point(f32, f32); @@ -54,8 +53,8 @@ let unit_x = Point(1.0, 0.0); assert_eq!(unit_x.0, 1.0); ``` -[Inner attributes]: attributes.html -[TUPLE_INDEX]: tokens.html#integer-literals -[_Expression_]: expressions.html -[_InnerAttribute_]: attributes.html -[attributes on block expressions]: expressions/block-expr.html#attributes-on-block-expressions +[Inner attributes]: ../attributes.html +[TUPLE_INDEX]: ../tokens.html#integer-literals +[_Expression_]: ../expressions.html +[_InnerAttribute_]: ../attributes.html +[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions diff --git a/src/items/associated-items.md b/src/items/associated-items.md index 9223a7461..f4f976b1d 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -4,11 +4,7 @@ [implementations]. They are called this because they are defined on an associate type — the type in the implementation. They are a subset of the kinds of items you can declare in a module. Specifically, there are [associated -functions] (including methods), [associated types], and [associated constants]. - -[associated functions]: #associated-functions-and-methods -[associated types]: #associated-types -[associated constants]: #associated-constants +functions] \(including methods), [associated types], and [associated constants]. Associated items are useful when the associated item logically is related to the associating item. For example, the `is_some` method on `Option` is intrinsically @@ -324,31 +320,31 @@ fn main() { } ``` -[_BlockExpression_]: expressions/block-expr.html -[_FunctionParam_]: items/functions.html -[_FunctionQualifiers_]: items/functions.html -[_FunctionReturnType_]: items/functions.html -[_Generics_]: items/generics.html -[_Lifetime_]: trait-bounds.html -[_Type_]: types.html#type-expressions -[_WhereClause_]: items/generics.html#where-clauses -[`Arc`]: special-types-and-traits.html#arct -[`Box`]: special-types-and-traits.html#boxt -[`Pin

`]: special-types-and-traits.html#pinp -[`Rc`]: special-types-and-traits.html#rct -[trait]: items/traits.html -[traits]: items/traits.html -[type aliases]: items/type-aliases.html -[inherent implementations]: items/implementations.html#inherent-implementations -[identifier]: identifiers.html -[identifier pattern]: patterns.html#identifier-patterns -[trait object]: types/trait-object.html -[implementations]: items/implementations.html -[type]: types.html#type-expressions -[constants]: items/constant-items.html -[constant item]: items/constant-items.html -[functions]: items/functions.html -[function item]: types/function-item.html -[method call operator]: expressions/method-call-expr.html -[block]: expressions/block-expr.html -[path]: paths.html +[_BlockExpression_]: ../expressions/block-expr.html +[_FunctionParam_]: ../items/functions.html +[_FunctionQualifiers_]: ../items/functions.html +[_FunctionReturnType_]: ../items/functions.html +[_Generics_]: ../items/generics.html +[_Lifetime_]: ../trait-bounds.html +[_Type_]: ../types.html#type-expressions +[_WhereClause_]: ../items/generics.html#where-clauses +[`Arc`]: ../special-types-and-traits.html#arct +[`Box`]: ../special-types-and-traits.html#boxt +[`Pin

`]: ../special-types-and-traits.html#pinp +[`Rc`]: ../special-types-and-traits.html#rct +[trait]: ../items/traits.html +[traits]: ../items/traits.html +[type aliases]: ../items/type-aliases.html +[inherent implementations]: ../items/implementations.html#inherent-implementations +[identifier]: ../identifiers.html +[identifier pattern]: ../patterns.html#identifier-patterns +[trait object]: ../types/trait-object.html +[implementations]: ../items/implementations.html +[type]: ../types.html#type-expressions +[constants]: ../items/constant-items.html +[constant item]: ../items/constant-items.html +[functions]: ../items/functions.html +[function item]: ../types/function-item.html +[method call operator]: ../expressions/method-call-expr.html +[block]: ../expressions/block-expr.html +[path]: ../paths.html diff --git a/src/items/constant-items.md b/src/items/constant-items.md index ac3c0ebd4..6d8836fa7 100644 --- a/src/items/constant-items.md +++ b/src/items/constant-items.md @@ -60,9 +60,9 @@ fn create_and_drop_zero_with_destructor() { } ``` -[constant value]: const_eval.html#constant-expressions -[static lifetime elision]: lifetime-elision.html#static-lifetime-elision -[`Drop`]: special-types-and-traits.html#drop -[IDENTIFIER]: identifiers.html -[_Type_]: types.html#type-expressions -[_Expression_]: expressions.html +[constant value]: ../const_eval.html#constant-expressions +[static lifetime elision]: ../lifetime-elision.html#static-lifetime-elision +[`Drop`]: ../special-types-and-traits.html#drop +[IDENTIFIER]: ../identifiers.html +[_Type_]: ../types.html#type-expressions +[_Expression_]: ../expressions.html diff --git a/src/items/enumerations.md b/src/items/enumerations.md index 0dc8064cc..b9f4c681e 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -131,17 +131,17 @@ no valid values, they cannot be instantiated. enum ZeroVariants {} ``` -[IDENTIFIER]: identifiers.html -[_Generics_]: items/generics.html -[_WhereClause_]: items/generics.html#where-clauses -[_Expression_]: expressions.html -[_TupleFields_]: items/structs.html -[_StructFields_]: items/structs.html -[enumerated type]: types/enum.html -[`mem::discriminant`]: ../std/mem/fn.discriminant.html -[numeric cast]: expressions/operator-expr.html#semantics -[`repr` attribute]: attributes.html#ffi-attributes -[constant expression]: const_eval.html#constant-expressions -[default representation]: type-layout.html#the-default-representation -[primitive representation]: type-layout.html#primitive-representations -[`C` representation]: type-layout.html#the-c-representation +[IDENTIFIER]: ../identifiers.html +[_Generics_]: ../items/generics.html +[_WhereClause_]: ../items/generics.html#where-clauses +[_Expression_]: ../expressions.html +[_TupleFields_]: ../items/structs.html +[_StructFields_]: ../items/structs.html +[enumerated type]: ../types/enum.html +[`mem::discriminant`]: ../../std/mem/fn.discriminant.html +[numeric cast]: ../expressions/operator-expr.html#semantics +[`repr` attribute]: ../attributes.html#ffi-attributes +[constant expression]: ../const_eval.html#constant-expressions +[default representation]: ../type-layout.html#the-default-representation +[primitive representation]: ../type-layout.html#primitive-representations +[`C` representation]: ../type-layout.html#the-c-representation diff --git a/src/items/extern-crates.md b/src/items/extern-crates.md index 8648fb47b..eed4511ea 100644 --- a/src/items/extern-crates.md +++ b/src/items/extern-crates.md @@ -96,14 +96,14 @@ will avoid being reported as unused. The [`#[macro_use]` attribute] will work as usual and import the macro names into the macro-use prelude. -[IDENTIFIER]: identifiers.html +[IDENTIFIER]: ../identifiers.html [RFC 940]: https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md -[`#[macro_use]` attribute]: attributes.html#macro-related-attributes +[`#[macro_use]` attribute]: ../attributes.html#macro-related-attributes [`alloc`]: https://doc.rust-lang.org/alloc/ -[`crate::`]: paths.html#crate -[`no_implicit_prelude`]: items/modules.html#prelude-items -[`no_std`]: crates-and-source-files.html#preludes-and-no_std +[`crate::`]: ../paths.html#crate +[`no_implicit_prelude`]: ../items/modules.html#prelude-items +[`no_std`]: ../crates-and-source-files.html#preludes-and-no_std [`proc_macro`]: https://doc.rust-lang.org/proc_macro/ -[`self::`]: paths.html#self +[`self::`]: ../paths.html#self [`test`]: https://doc.rust-lang.org/test/ -[use declarations]: items/use-declarations.html +[use declarations]: ../items/use-declarations.html diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index b4f16b881..3188c0d34 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -115,15 +115,15 @@ this to satisfy the linking requirements of extern blocks elsewhere in your code (including upstream crates) instead of adding the attribute to each extern block. -[IDENTIFIER]: identifiers.html -[_Abi_]: items/functions.html -[_FunctionParam_]: items/functions.html -[_FunctionParameters_]: items/functions.html -[_FunctionReturnType_]: items/functions.html -[_Generics_]: items/generics.html -[_InnerAttribute_]: attributes.html -[_OuterAttribute_]: attributes.html -[_Type_]: types.html#type-expressions -[_Visibility_]: visibility-and-privacy.html -[_WhereClause_]: items/generics.html#where-clauses -[attributes]: attributes.html#ffi-attributes +[IDENTIFIER]: ../identifiers.html +[_Abi_]: ../items/functions.html +[_FunctionParam_]: ../items/functions.html +[_FunctionParameters_]: ../items/functions.html +[_FunctionReturnType_]: ../items/functions.html +[_Generics_]: ../items/generics.html +[_InnerAttribute_]: ../attributes.html +[_OuterAttribute_]: ../attributes.html +[_Type_]: ../types.html#type-expressions +[_Visibility_]: ../visibility-and-privacy.html +[_WhereClause_]: ../items/generics.html#where-clauses +[attributes]: ../attributes.html#ffi-attributes diff --git a/src/items/functions.md b/src/items/functions.md index 9a0a682e4..7b33cd091 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -212,33 +212,33 @@ attributes], [`must_use`], [the procedural macro attributes], [the testing attributes], and [the optimization hint attributes]. Functions also accept attributes macros. -[IDENTIFIER]: identifiers.html -[RAW_STRING_LITERAL]: tokens.html#raw-string-literals -[STRING_LITERAL]: tokens.html#string-literals -[_BlockExpression_]: expressions/block-expr.html -[_Generics_]: items/generics.html -[_InnerAttribute_]: attributes.html -[_Pattern_]: patterns.html -[_Statement_]: statements.html -[_Type_]: types.html#type-expressions -[_WhereClause_]: items/generics.html#where-clauses -[const context]: const_eval.html#const-context -[external blocks]: items/external-blocks.html -[path]: paths.html -[block]: expressions/block-expr.html -[variables]: variables.html -[type]: types.html#type-expressions -[*function item type*]: types/function-item.html -[Trait]: items/traits.html -[attributes]: attributes.html -[`cfg`]: conditional-compilation.html -[the lint check attributes]: attributes.html#lint-check-attributes -[the procedural macro attributes]: procedural-macros.html -[the testing attributes]: attributes.html#testing -[the optimization hint attributes]: attributes.html#optimization-hints -[`deprecated`]: attributes.html#deprecation -[`doc`]: attributes.html#documentation -[`must_use`]: attributes.html#must_use -[patterns]: patterns.html -[`?Sized`]: trait-bounds.html#sized -[trait bounds]: trait-bounds.html +[IDENTIFIER]: ../identifiers.html +[RAW_STRING_LITERAL]: ../tokens.html#raw-string-literals +[STRING_LITERAL]: ../tokens.html#string-literals +[_BlockExpression_]: ../expressions/block-expr.html +[_Generics_]: ../items/generics.html +[_InnerAttribute_]: ../attributes.html +[_Pattern_]: ../patterns.html +[_Statement_]: ../statements.html +[_Type_]: ../types.html#type-expressions +[_WhereClause_]: ../items/generics.html#where-clauses +[const context]: ../const_eval.html#const-context +[external blocks]: ../items/external-blocks.html +[path]: ../paths.html +[block]: ../expressions/block-expr.html +[variables]: ../variables.html +[type]: ../types.html#type-expressions +[*function item type*]: ../types/function-item.html +[Trait]: ../items/traits.html +[attributes]: ../attributes.html +[`cfg`]: ../conditional-compilation.html +[the lint check attributes]: ../attributes.html#lint-check-attributes +[the procedural macro attributes]: ../procedural-macros.html +[the testing attributes]: ../attributes.html#testing +[the optimization hint attributes]: ../attributes.html#optimization-hints +[`deprecated`]: ../attributes.html#deprecation +[`doc`]: ../attributes.html#documentation +[`must_use`]: ../attributes.html#must_use +[patterns]: ../patterns.html +[`?Sized`]: ../trait-bounds.html#sized +[trait bounds]: ../trait-bounds.html diff --git a/src/items/generics.md b/src/items/generics.md index c86d227bc..b8c15e3e3 100644 --- a/src/items/generics.md +++ b/src/items/generics.md @@ -100,22 +100,22 @@ generic parameter. } ``` -[IDENTIFIER]: identifiers.html -[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels - -[_LifetimeBounds_]: trait-bounds.html -[_Lifetime_]: trait-bounds.html -[_OuterAttribute_]: attributes.html -[_Type_]: types.html#type-expressions -[_TypeParamBounds_]: trait-bounds.html - -[arrays]: types/array.html -[function pointers]: types/function-pointer.html -[references]: types/pointer.html#shared-references- -[raw pointers]: types/pointer.html#raw-pointers-const-and-mut -[`Clone`]: special-types-and-traits.html#clone -[`Copy`]: special-types-and-traits.html#copy -[`Sized`]: special-types-and-traits.html#sized -[tuples]: types/tuple.html -[trait object]: types/trait-object.html -[attributes]: attributes.html +[IDENTIFIER]: ../identifiers.html +[LIFETIME_OR_LABEL]: ../tokens.html#lifetimes-and-loop-labels + +[_LifetimeBounds_]: ../trait-bounds.html +[_Lifetime_]: ../trait-bounds.html +[_OuterAttribute_]: ../attributes.html +[_Type_]: ../types.html#type-expressions +[_TypeParamBounds_]: ../trait-bounds.html + +[arrays]: ../types/array.html +[function pointers]: ../types/function-pointer.html +[references]: ../types/pointer.html#shared-references- +[raw pointers]: ../types/pointer.html#raw-pointers-const-and-mut +[`Clone`]: ../special-types-and-traits.html#clone +[`Copy`]: ../special-types-and-traits.html#copy +[`Sized`]: ../special-types-and-traits.html#sized +[tuples]: ../types/tuple.html +[trait object]: ../types/trait-object.html +[attributes]: ../attributes.html diff --git a/src/items/implementations.md b/src/items/implementations.md index 6e1352ff7..47b0431f1 100644 --- a/src/items/implementations.md +++ b/src/items/implementations.md @@ -177,23 +177,23 @@ attributes must come before any associated items. That attributes that have meaning here are [`cfg`], [`deprecated`], [`doc`], and [the lint check attributes]. -[IDENTIFIER]: identifiers.html -[_ConstantItem_]: items/constant-items.html -[_Function_]: items/functions.html -[_Generics_]: items/generics.html -[_InnerAttribute_]: attributes.html -[_MacroInvocationSemi_]: macros.html#macro-invocation -[_Method_]: items/associated-items.html#methods -[_OuterAttribute_]: attributes.html -[_TypeAlias_]: items/type-aliases.html -[_TypePath_]: paths.html#paths-in-types -[_Type_]: types.html#type-expressions -[_Visibility_]: visibility-and-privacy.html -[_WhereClause_]: items/generics.html#where-clauses -[trait]: items/traits.html -[attributes]: attributes.html -[`cfg`]: conditional-compilation.html -[`deprecated`]: attributes.html#deprecation -[`doc`]: attributes.html#documentation -[the lint check attributes]: attributes.html#lint-check-attributes -[Unsafe traits]: items/traits.html#unsafe-traits +[IDENTIFIER]: ../identifiers.html +[_ConstantItem_]: ../items/constant-items.html +[_Function_]: ../items/functions.html +[_Generics_]: ../items/generics.html +[_InnerAttribute_]: ../attributes.html +[_MacroInvocationSemi_]: ../macros.html#macro-invocation +[_Method_]: ../items/associated-items.html#methods +[_OuterAttribute_]: ../attributes.html +[_TypeAlias_]: ../items/type-aliases.html +[_TypePath_]: ../paths.html#paths-in-types +[_Type_]: ../types.html#type-expressions +[_Visibility_]: ../visibility-and-privacy.html +[_WhereClause_]: ../items/generics.html#where-clauses +[trait]: ../items/traits.html +[attributes]: ../attributes.html +[`cfg`]: ../conditional-compilation.html +[`deprecated`]: ../attributes.html#deprecation +[`doc`]: ../attributes.html#documentation +[the lint check attributes]: ../attributes.html#lint-check-attributes +[Unsafe traits]: ../items/traits.html#unsafe-traits diff --git a/src/items/modules.md b/src/items/modules.md index f22b69bff..df4abaaf7 100644 --- a/src/items/modules.md +++ b/src/items/modules.md @@ -139,15 +139,15 @@ The built-in attributes that have meaning on a function are [`cfg`], [`deprecated`], [`doc`], [the lint check attributes], `path`, and `no_implicit_prelude`. Modules also accept macro attributes. -[_InnerAttribute_]: attributes.html -[_Item_]: items.html -[_OuterAttribute_]: attributes.html -[`cfg`]: conditional-compilation.html -[`deprecated`]: attributes.html#deprecation -[`doc`]: attributes.html#documentation -[IDENTIFIER]: identifiers.html -[attribute]: attributes.html -[items]: items.html -[module path]: paths.html -[prelude]: crates-and-source-files.html#preludes-and-no_std -[the lint check attributes]: attributes.html#lint-check-attributes +[_InnerAttribute_]: ../attributes.html +[_Item_]: ../items.html +[_OuterAttribute_]: ../attributes.html +[`cfg`]: ../conditional-compilation.html +[`deprecated`]: ../attributes.html#deprecation +[`doc`]: ../attributes.html#documentation +[IDENTIFIER]: ../identifiers.html +[attribute]: ../attributes.html +[items]: ../items.html +[module path]: ../paths.html +[prelude]: ../crates-and-source-files.html#preludes-and-no_std +[the lint check attributes]: ../attributes.html#lint-check-attributes diff --git a/src/items/static-items.md b/src/items/static-items.md index bcb4b6d7b..74d4c2ef9 100644 --- a/src/items/static-items.md +++ b/src/items/static-items.md @@ -68,10 +68,10 @@ following are true: * The single-address property of statics is required. * Interior mutability is required. -[constant]: items/constant-items.html -[`drop`]: destructors.html -[constant expression]: const_eval.html#constant-expressions -[interior mutable]: interior-mutability.html -[IDENTIFIER]: identifiers.html -[_Type_]: types.html#type-expressions -[_Expression_]: expressions.html +[constant]: ../items/constant-items.html +[`drop`]: ../destructors.html +[constant expression]: ../const_eval.html#constant-expressions +[interior mutable]: ../interior-mutability.html +[IDENTIFIER]: ../identifiers.html +[_Type_]: ../types.html#type-expressions +[_Expression_]: ../expressions.html diff --git a/src/items/structs.md b/src/items/structs.md index 6634afb29..9377b9e3d 100644 --- a/src/items/structs.md +++ b/src/items/structs.md @@ -49,8 +49,8 @@ let px: i32 = p.x; A _tuple struct_ is a nominal [tuple type], also defined with the keyword `struct`. For example: -[struct type]: types/struct.html -[tuple type]: types/tuple.html +[struct type]: ../types/struct.html +[tuple type]: ../types/tuple.html ```rust struct Point(i32, i32); @@ -78,11 +78,10 @@ let c = [Cookie, Cookie {}, Cookie, Cookie {}]; The precise memory layout of a struct is not specified. One can specify a particular layout using the [`repr` attribute]. -[`repr` attribute]: type-layout.html#representations - -[_OuterAttribute_]: attributes.html -[IDENTIFIER]: identifiers.html -[_Generics_]: items/generics.html -[_WhereClause_]: items/generics.html#where-clauses -[_Visibility_]: visibility-and-privacy.html -[_Type_]: types.html#type-expressions +[`repr` attribute]: ../type-layout.html#representations +[_OuterAttribute_]: ../attributes.html +[IDENTIFIER]: ../identifiers.html +[_Generics_]: ../items/generics.html +[_WhereClause_]: ../items/generics.html#where-clauses +[_Visibility_]: ../visibility-and-privacy.html +[_Type_]: ../types.html#type-expressions diff --git a/src/items/traits.md b/src/items/traits.md index 9e1a524f2..c1c5ff598 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -49,9 +49,9 @@ A _trait_ describes an abstract interface that types can implement. This interface consists of [associated items], which come in three varieties: -- [functions](items/associated-items.html#associated-functions-and-methods) -- [types](items/associated-items.html#associated-types) -- [constants](items/associated-items.html#associated-constants) +- [functions] +- [types] +- [constants] All traits define an implicit type parameter `Self` that refers to "the type that is implementing this interface". Traits may also contain additional type @@ -204,32 +204,32 @@ trait T { } ``` -[IDENTIFIER]: identifiers.html -[WildcardPattern]: patterns.html#wildcard-pattern -[_BlockExpression_]: expressions/block-expr.html -[_Expression_]: expressions.html -[_FunctionParam_]: items/functions.html -[_FunctionQualifiers_]: items/functions.html -[_FunctionReturnType_]: items/functions.html -[_Generics_]: items/generics.html -[_MacroInvocationSemi_]: macros.html#macro-invocation -[_OuterAttribute_]: attributes.html -[_Pattern_]: patterns.html -[_SelfParam_]: items/associated-items.html#methods -[_TypeParamBounds_]: trait-bounds.html -[_Type_]: types.html#type-expressions -[_WhereClause_]: items/generics.html#where-clauses -[bounds]: trait-bounds.html -[trait object]: types/trait-object.html -[explicit]: expressions/operator-expr.html#type-cast-expressions +[IDENTIFIER]: ../identifiers.html +[WildcardPattern]: ../patterns.html#wildcard-pattern +[_BlockExpression_]: ../expressions/block-expr.html +[_Expression_]: ../expressions.html +[_FunctionParam_]: ../items/functions.html +[_FunctionQualifiers_]: ../items/functions.html +[_FunctionReturnType_]: ../items/functions.html +[_Generics_]: ../items/generics.html +[_MacroInvocationSemi_]: ../macros.html#macro-invocation +[_OuterAttribute_]: ../attributes.html +[_Pattern_]: ../patterns.html +[_SelfParam_]: ../items/associated-items.html#methods +[_TypeParamBounds_]: ../trait-bounds.html +[_Type_]: ../types.html#type-expressions +[_WhereClause_]: ../items/generics.html#where-clauses +[bounds]: ../trait-bounds.html +[trait object]: ../types/trait-object.html +[explicit]: ../expressions/operator-expr.html#type-cast-expressions [RFC 255]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md -[associated items]: items/associated-items.html -[method]: items/associated-items.html#methods -[implementations]: items/implementations.html -[generics]: items/generics.html -[where clauses]: items/generics.html#where-clauses -[generic functions]: items/functions.html#generic-functions -[unsafe]: unsafety.html -[trait implementation]: items/implementations.html#trait-implementations -[`Send`]: special-types-and-traits.html#send -[`Sync`]: special-types-and-traits.html#sync +[associated items]: ../items/associated-items.html +[method]: ../items/associated-items.html#methods +[implementations]: ../items/implementations.html +[generics]: ../items/generics.html +[where clauses]: ../items/generics.html#where-clauses +[generic functions]: ../items/functions.html#generic-functions +[unsafe]: ../unsafety.html +[trait implementation]: ../items/implementations.html#trait-implementations +[`Send`]: ../special-types-and-traits.html#send +[`Sync`]: ../special-types-and-traits.html#sync diff --git a/src/items/type-aliases.md b/src/items/type-aliases.md index 6ba22a87b..73278fc7b 100644 --- a/src/items/type-aliases.md +++ b/src/items/type-aliases.md @@ -10,8 +10,6 @@ declared with the keyword `type`. Every value has a single, specific type, but may implement several different traits, or be compatible with several different type constraints. -[type]: types.html - For example, the following defines the type `Point` as a synonym for the type `(u8, u8)`, the type of pairs of unsigned 8 bit integers: @@ -29,7 +27,7 @@ let _: F = E::A; // OK // let _: F = F::A; // Doesn't work ``` -[IDENTIFIER]: identifiers.html -[_Generics_]: items/generics.html -[_WhereClause_]: items/generics.html#where-clauses -[_Type_]: types.html#type-expressions +[IDENTIFIER]: ../identifiers.html +[_Generics_]: ../items/generics.html +[_WhereClause_]: ../items/generics.html#where-clauses +[_Type_]: ../types.html#type-expressions diff --git a/src/items/unions.md b/src/items/unions.md index 43dc720cc..4cab4f317 100644 --- a/src/items/unions.md +++ b/src/items/unions.md @@ -148,8 +148,8 @@ aspects of Rust language (such as privacy, name resolution, type inference, generics, trait implementations, inherent implementations, coherence, pattern checking, etc etc etc). -[IDENTIFIER]: identifiers.html -[_Generics_]: items/generics.html -[_WhereClause_]: items/generics.html#where-clauses -[_StructFields_]: items/structs.html +[IDENTIFIER]: ../identifiers.html +[_Generics_]: ../items/generics.html +[_WhereClause_]: ../items/generics.html#where-clauses +[_StructFields_]: ../items/structs.html [`transmute`]: ../../std/mem/fn.transmute.html diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 264d52a54..ff4894e4f 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -14,9 +14,13 @@ some other [path]. Usually a `use` declaration is used to shorten the path required to refer to a module item. These declarations may appear in [modules] and [blocks], usually at the top. -[path]: paths.html -[modules]: items/modules.html -[blocks]: expressions/block-expr.html +[path]: ../paths.html +[modules]: ../items/modules.html +[blocks]: ../expressions/block-expr.html + +> **Note**: Unlike in many languages, `use` declarations in Rust do *not* +> declare linkage dependency with external crates. Rather, [`extern crate` +> declarations](../items/extern-crates.html) declare linkage dependencies. Use declarations support a number of convenient shortcuts: @@ -195,8 +199,8 @@ m!(use std as _;); // use std as _; ``` -[IDENTIFIER]: identifiers.html -[_SimplePath_]: paths.html#simple-paths -[`extern crate`]: items/extern-crates.html -[extern prelude]: items/extern-crates.html#extern-prelude -[path qualifiers]: paths.html#path-qualifiers +[IDENTIFIER]: ../identifiers.html +[_SimplePath_]: ../paths.html#simple-paths +[`extern crate`]: ../items/extern-crates.html +[extern prelude]: ../items/extern-crates.html#extern-prelude +[path qualifiers]: ../paths.html#path-qualifiers diff --git a/src/types/array.md b/src/types/array.md index a091675fe..92347e406 100644 --- a/src/types/array.md +++ b/src/types/array.md @@ -24,7 +24,7 @@ always bounds-checked in safe methods and operators. > Note: The [`Vec`] standard library type provides a heap-allocated resizable > array type. -[_Expression_]: expressions.html -[_Type_]: types.html#type-expressions -[`Vec`]: ../std/vec/struct.Vec.html -[`usize`]: types/numeric.html#machine-dependent-integer-types +[_Expression_]: ../expressions.html +[_Type_]: ../types.html#type-expressions +[`Vec`]: ../../std/vec/struct.Vec.html +[`usize`]: ../types/numeric.html#machine-dependent-integer-types diff --git a/src/types/closure.md b/src/types/closure.md index 785b78fbe..ec4560581 100644 --- a/src/types/closure.md +++ b/src/types/closure.md @@ -165,13 +165,13 @@ Because captures are often by reference, the following general rules arise: unique immutable or mutable reference, and if all values it captures by copy or move are [`Clone`] or [`Copy`], respectively. -[`Clone`]: special-types-and-traits.html#clone -[`Copy`]: special-types-and-traits.html#copy -[`FnMut`]: ../std/ops/trait.FnMut.html -[`FnOnce`]: ../std/ops/trait.FnOnce.html -[`Fn`]: ../std/ops/trait.Fn.html -[`Send`]: special-types-and-traits.html#send -[`Sized`]: special-types-and-traits.html#sized -[`Sync`]: special-types-and-traits.html#sync -[closure expression]: expressions/closure-expr.html -[derived]: attributes.html#derive +[`Clone`]: ../special-types-and-traits.html#clone +[`Copy`]: ../special-types-and-traits.html#copy +[`FnMut`]: ../../std/ops/trait.FnMut.html +[`FnOnce`]: ../../std/ops/trait.FnOnce.html +[`Fn`]: ../../std/ops/trait.Fn.html +[`Send`]: ../special-types-and-traits.html#send +[`Sized`]: ../special-types-and-traits.html#sized +[`Sync`]: ../special-types-and-traits.html#sync +[closure expression]: ../expressions/closure-expr.html +[derived]: ../attributes.html#derive diff --git a/src/types/enum.md b/src/types/enum.md index e40ca381a..a8249dc1a 100644 --- a/src/types/enum.md +++ b/src/types/enum.md @@ -19,5 +19,5 @@ named reference to an [`enum` item]. [^enumtype]: The `enum` type is analogous to a `data` constructor declaration in ML, or a *pick ADT* in Limbo. -[`enum` item]: items/enumerations.html -[enumeration variant expression]: expressions/enum-variant-expr.html +[`enum` item]: ../items/enumerations.html +[enumeration variant expression]: ../expressions/enum-variant-expr.html diff --git a/src/types/function-item.md b/src/types/function-item.md index dee74e48e..3094b5f8e 100644 --- a/src/types/function-item.md +++ b/src/types/function-item.md @@ -46,12 +46,12 @@ let foo_ptr_2 = if want_i32 { All function items implement [`Fn`], [`FnMut`], [`FnOnce`], [`Copy`], [`Clone`], [`Send`], and [`Sync`]. -[`Clone`]: special-types-and-traits.html#clone -[`Copy`]: special-types-and-traits.html#copy -[`FnMut`]: ../std/ops/trait.FnMut.html -[`FnOnce`]: ../std/ops/trait.FnOnce.html -[`Fn`]: ../std/ops/trait.Fn.html -[`Send`]: special-types-and-traits.html#send -[`Sync`]: special-types-and-traits.html#sync -[coercion]: type-coercions.html -[function pointers]: types/function-pointer.html +[`Clone`]: ../special-types-and-traits.html#clone +[`Copy`]: ../special-types-and-traits.html#copy +[`FnMut`]: ../../std/ops/trait.FnMut.html +[`FnOnce`]: ../../std/ops/trait.FnOnce.html +[`Fn`]: ../../std/ops/trait.Fn.html +[`Send`]: ../special-types-and-traits.html#send +[`Sync`]: ../special-types-and-traits.html#sync +[coercion]: ../type-coercions.html +[function pointers]: ../types/function-pointer.html diff --git a/src/types/function-pointer.md b/src/types/function-pointer.md index be0302cb2..999d6f013 100644 --- a/src/types/function-pointer.md +++ b/src/types/function-pointer.md @@ -44,13 +44,13 @@ let bo: Binop = add; x = bo(5,7); ``` -[IDENTIFIER]: identifiers.html -[_ForLifetimes_]: items/generics.html#where-clauses -[_FunctionQualifiers_]: items/functions.html -[_TypeNoBounds_]: types.html#type-expressions -[_Type_]: types.html#type-expressions -[`extern`]: items/external-blocks.html -[closures]: types/closure.html -[extern function]: items/functions.html#extern-functions -[function items]: types/function-item.html -[unsafe function]: unsafe-functions.html +[IDENTIFIER]: ../identifiers.html +[_ForLifetimes_]: ../items/generics.html#where-clauses +[_FunctionQualifiers_]: ../items/functions.html +[_TypeNoBounds_]: ../types.html#type-expressions +[_Type_]: ../types.html#type-expressions +[`extern`]: ../items/external-blocks.html +[closures]: ../types/closure.html +[extern function]: ../items/functions.html#extern-functions +[function items]: ../types/function-item.html +[unsafe function]: ../unsafe-functions.html diff --git a/src/types/impl-trait.md b/src/types/impl-trait.md index db3c2d89f..fd08d0be9 100644 --- a/src/types/impl-trait.md +++ b/src/types/impl-trait.md @@ -33,5 +33,5 @@ type. They are written as `impl` followed by a set of trait bounds. -[_TraitBound_]: trait-bounds.html -[_TypeParamBounds_]: trait-bounds.html +[_TraitBound_]: ../trait-bounds.html +[_TypeParamBounds_]: ../trait-bounds.html diff --git a/src/types/pointer.md b/src/types/pointer.md index c9cb64bc5..24c80d3de 100644 --- a/src/types/pointer.md +++ b/src/types/pointer.md @@ -49,9 +49,9 @@ also have their addition data compared. The standard library contains additional 'smart pointer' types beyond references and raw pointers. -[Interior mutability]: interior-mutability.html -[_Lifetime_]: trait-bounds.html -[_TypeNoBounds_]: types.html#type-expressions -[`unsafe` operation]: unsafety.html -[dynamically sized types]: dynamically-sized-types.html -[temporary value]: expressions.html#temporary-lifetimes +[Interior mutability]: ../interior-mutability.html +[_Lifetime_]: ../trait-bounds.html +[_TypeNoBounds_]: ../types.html#type-expressions +[`unsafe` operation]: ../unsafety.html +[dynamically sized types]: ../dynamically-sized-types.html +[temporary value]: ../expressions.html#temporary-lifetimes diff --git a/src/types/slice.md b/src/types/slice.md index 3a5a05d08..798821685 100644 --- a/src/types/slice.md +++ b/src/types/slice.md @@ -28,5 +28,5 @@ let slice: &[i32] = &boxed_array[..]; All elements of slices are always initialized, and access to a slice is always bounds-checked in safe methods and operators. -[_Type_]: types.html#type-expressions -[dynamically sized type]: dynamically-sized-types.html +[_Type_]: ../types.html#type-expressions +[dynamically sized type]: ../dynamically-sized-types.html diff --git a/src/types/struct.md b/src/types/struct.md index a398d1b91..8ddf36674 100644 --- a/src/types/struct.md +++ b/src/types/struct.md @@ -24,5 +24,5 @@ value that inhabits such a type. [^structtype]: `struct` types are analogous to `struct` types in C, the *record* types of the ML family, or the *struct* types of the Lisp family. -[struct expression]: expressions/struct-expr.html -[visibility modifiers]: visibility-and-privacy.html +[struct expression]: ../expressions/struct-expr.html +[visibility modifiers]: ../visibility-and-privacy.html diff --git a/src/types/textual.md b/src/types/textual.md index e5fe6db7a..ade5e6b19 100644 --- a/src/types/textual.md +++ b/src/types/textual.md @@ -13,4 +13,4 @@ unsigned bytes holding a sequence of UTF-8 code points. Since `str` is a instantiated through a pointer type, such as `&str`. [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value -[dynamically sized type]: dynamically-sized-types.html +[dynamically sized type]: ../dynamically-sized-types.html diff --git a/src/types/trait-object.md b/src/types/trait-object.md index eb31a1bbd..2ba41e8ea 100644 --- a/src/types/trait-object.md +++ b/src/types/trait-object.md @@ -104,11 +104,11 @@ need to be expressed as part of the trait object. This lifetime is written as `Trait + 'a`. There are [defaults] that allow this lifetime to usually be inferred with a sensible choice. -[_TraitBound_]: trait-bounds.html -[_TypeParamBounds_]: types.html#type-expressions -[auto traits]: special-types-and-traits.html#auto-traits -[defaults]: lifetime-elision.html#default-trait-object-lifetimes -[dynamically sized types]: dynamically-sized-types.html +[_TraitBound_]: ../trait-bounds.html +[_TypeParamBounds_]: ../types.html#type-expressions +[auto traits]: ../special-types-and-traits.html#auto-traits +[defaults]: ../lifetime-elision.html#default-trait-object-lifetimes +[dynamically sized types]: ../dynamically-sized-types.html [issue 33140]: https://github.com/rust-lang/rust/issues/33140 -[object safe]: items/traits.html#object-safety -[supertraits]: items/traits.html#supertraits +[object safe]: ../items/traits.html#object-safety +[supertraits]: ../items/traits.html#supertraits diff --git a/src/types/tuple.md b/src/types/tuple.md index 195346b2d..2fb65c57d 100644 --- a/src/types/tuple.md +++ b/src/types/tuple.md @@ -31,4 +31,4 @@ assert_eq!(p.1, "ten"); For historical reasons and convenience, the tuple type with no elements (`()`) is often called ‘unit’ or ‘the unit type’. -[_Type_]: types.html#type-expressions +[_Type_]: ../types.html#type-expressions diff --git a/src/types/union.md b/src/types/union.md index de7e720a2..08ba43cd3 100644 --- a/src/types/union.md +++ b/src/types/union.md @@ -11,5 +11,5 @@ implement [`Copy`]. The memory layout of a `union` is undefined by default, but the `#[repr(...)]` attribute can be used to fix a layout. -[`Copy`]: special-types-and-traits.html#copy -[`union` item]: items/unions.html +[`Copy`]: ../special-types-and-traits.html#copy +[`union` item]: ../items/unions.html From fb624825382712b6ea708ca6a424ec0f427a5a0e Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Tue, 7 Aug 2018 04:49:57 -0400 Subject: [PATCH 3/5] Add vim temporary files to gitignore. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7585238ef..79903517d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ book +*~ +.*.sw* From 6629f768d44b1d5171c4101a5db5d26a4de44845 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Tue, 29 Jan 2019 10:34:09 -0500 Subject: [PATCH 4/5] Update travis build to use 2.X --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index de1a08fd0..c3b31dc04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ rust: - nightly install: - - travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.1.7/mdbook-v0.1.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin + - travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.3/mdbook-v0.2.3-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin script: - export PATH=$PATH:/home/travis/.cargo/bin && mdbook test From a852878dff3a1e6cf3ba30c6758c2e5d228d4785 Mon Sep 17 00:00:00 2001 From: Alexis Hunt Date: Sat, 2 Feb 2019 12:45:04 -0500 Subject: [PATCH 5/5] Update internal links to use .md, not .html. --- src/attributes.md | 82 +++++++------- src/comments.md | 2 +- src/conditional-compilation.md | 20 ++-- src/const_eval.md | 70 ++++++------ src/crates-and-source-files.md | 24 ++-- src/destructors.md | 20 ++-- src/dynamically-sized-types.md | 14 +-- src/expressions.md | 158 +++++++++++++-------------- src/expressions/array-expr.md | 22 ++-- src/expressions/block-expr.md | 48 ++++---- src/expressions/call-expr.md | 6 +- src/expressions/closure-expr.md | 28 ++--- src/expressions/enum-variant-expr.md | 10 +- src/expressions/field-expr.md | 16 +-- src/expressions/grouped-expr.md | 8 +- src/expressions/if-expr.md | 12 +- src/expressions/literal-expr.md | 20 ++-- src/expressions/loop-expr.md | 20 ++-- src/expressions/match-expr.md | 42 +++---- src/expressions/method-call-expr.md | 24 ++-- src/expressions/operator-expr.md | 24 ++-- src/expressions/path-expr.md | 14 +-- src/expressions/range-expr.md | 2 +- src/expressions/return-expr.md | 2 +- src/expressions/struct-expr.md | 34 +++--- src/expressions/tuple-expr.md | 16 +-- src/glossary.md | 16 +-- src/identifiers.md | 4 +- src/interior-mutability.md | 4 +- src/introduction.md | 12 +- src/items-and-attributes.md | 4 +- src/items.md | 62 +++++------ src/items/associated-items.md | 56 +++++----- src/items/constant-items.md | 12 +- src/items/enumerations.md | 26 ++--- src/items/extern-crates.md | 14 +-- src/items/external-blocks.md | 24 ++-- src/items/functions.md | 60 +++++----- src/items/generics.md | 38 +++---- src/items/implementations.md | 40 +++---- src/items/modules.md | 24 ++-- src/items/static-items.md | 14 +-- src/items/structs.md | 18 +-- src/items/traits.md | 56 +++++----- src/items/type-aliases.md | 8 +- src/items/unions.md | 8 +- src/items/use-declarations.md | 18 +-- src/keywords.md | 22 ++-- src/lifetime-elision.md | 16 +-- src/linkage.md | 4 +- src/macros-by-example.md | 34 +++--- src/macros.md | 28 ++--- src/notation.md | 8 +- src/paths.md | 44 ++++---- src/patterns.md | 54 ++++----- src/procedural-macros.md | 36 +++--- src/special-types-and-traits.md | 48 ++++---- src/statements.md | 36 +++--- src/subtyping.md | 8 +- src/tokens.md | 90 +++++++-------- src/trait-bounds.md | 20 ++-- src/type-layout.md | 10 +- src/types.md | 112 +++++++++---------- src/types/array.md | 6 +- src/types/closure.md | 14 +-- src/types/enum.md | 4 +- src/types/function-item.md | 12 +- src/types/function-pointer.md | 20 ++-- src/types/impl-trait.md | 4 +- src/types/pointer.md | 12 +- src/types/slice.md | 4 +- src/types/struct.md | 4 +- src/types/textual.md | 2 +- src/types/trait-object.md | 14 +-- src/types/tuple.md | 2 +- src/types/union.md | 4 +- src/undocumented.md | 6 +- src/unsafety.md | 12 +- src/variables.md | 2 +- src/visibility-and-privacy.md | 2 +- 80 files changed, 975 insertions(+), 975 deletions(-) diff --git a/src/attributes.md b/src/attributes.md index 7454789cf..1081041e4 100644 --- a/src/attributes.md +++ b/src/attributes.md @@ -114,7 +114,7 @@ names have meaning. > sections for each attribute. It is not the full list of crate-root attributes. - `crate_name` - specify the crate's crate name. -- `crate_type` - see [linkage](linkage.html). +- `crate_type` - see [linkage](linkage.md). - `no_builtins` - disable optimizing certain code patterns to invocations of library functions that are assumed to exist - `no_main` - disable emitting the `main` symbol. Useful when some other @@ -145,7 +145,7 @@ On an `extern` block, the following attributes are interpreted: - `link` - indicate that a native library should be linked to for the declarations in this block to be linked correctly. `link` supports an optional `kind` key with three possible values: `dylib`, `static`, and `framework`. See - [external blocks](items/external-blocks.html) for more about external blocks. + [external blocks](items/external-blocks.md) for more about external blocks. Two examples: `#[link(name = "readline")]` and `#[link(name = "CoreFoundation", kind = "framework")]`. - `linked_from` - indicates what native library this block of FFI items is @@ -162,7 +162,7 @@ interpreted: - `linkage` - on a static, this specifies the [linkage type](http://llvm.org/docs/LangRef.html#linkage-types). -See [type layout](type-layout.html) for documentation on the `repr` attribute +See [type layout](type-layout.md) for documentation on the `repr` attribute which can be used to control type layout. ## Macro-related attributes @@ -210,7 +210,7 @@ fields, `since` and `note`. - `note` is a free text field, allowing you to provide an explanation about the deprecation and preferred alternatives. -Only [public items](visibility-and-privacy.html) can be given the +Only [public items](visibility-and-privacy.md) can be given the `#[deprecated]` attribute. `#[deprecated]` on a module is inherited by all child items of that module. @@ -552,45 +552,45 @@ impl PartialEq for Foo { You can implement `derive` for your own traits through [procedural macros]. -[_LiteralExpression_]: expressions/literal-expr.html -[_SimplePath_]: paths.html#simple-paths -[`no_implicit_prelude`]: items/modules.html#prelude-items -[`no_std`]: crates-and-source-files.html#preludes-and-no_std -[Doc comments]: comments.html#doc-comments +[_LiteralExpression_]: expressions/literal-expr.md +[_SimplePath_]: paths.md#simple-paths +[`no_implicit_prelude`]: items/modules.md#prelude-items +[`no_std`]: crates-and-source-files.md#preludes-and-no_std +[Doc comments]: comments.md#doc-comments [The Rustdoc Book]: ../rustdoc/the-doc-attribute.html -[module]: items/modules.html -[prelude]: crates-and-source-files.html#preludes-and-no_std -[procedural macros]: procedural-macros.html -[struct]: items/structs.html -[enum]: items/enumerations.html -[union]: items/unions.html -[functions]: items/functions.html -[expression]: expressions.html -[expression statement]: statements.html#expression-statements -[call expression]: expressions/call-expr.html -[block expression]: expressions/block-expr.html -[block expressions]: expressions/block-expr.html -[`Drop`]: special-types-and-traits.html#drop -[let statement]: statements.html#let-statements +[module]: items/modules.md +[prelude]: crates-and-source-files.md#preludes-and-no_std +[procedural macros]: procedural-macros.md +[struct]: items/structs.md +[enum]: items/enumerations.md +[union]: items/unions.md +[functions]: items/functions.md +[expression]: expressions.md +[expression statement]: statements.md#expression-statements +[call expression]: expressions/call-expr.md +[block expression]: expressions/block-expr.md +[block expressions]: expressions/block-expr.md +[`Drop`]: special-types-and-traits.md#drop +[let statement]: statements.md#let-statements [unstable book plugin]: ../unstable-book/language-features/plugin.html#lint-plugins -[zero-variant enum]: items/enumerations.html#zero-variant-enums +[zero-variant enum]: items/enumerations.md#zero-variant-enums [ECMA-334]: https://www.ecma-international.org/publications/standards/Ecma-334.htm [ECMA-335]: https://www.ecma-international.org/publications/standards/Ecma-335.htm -[item declarations]: items.html -[generics]: items/generics.html -[implementations]: items/implementations.html -[modules]: items/modules.html -[statements]: statements.html -[match expressions]: expressions/match-expr.html -[external blocks]: items/external-blocks.html -[items]: items.html -[attribute macro]: procedural-macros.html#attribute-macros -[function-like macro]: procedural-macros.html#function-like-procedural-macros -[conditional compilation]: conditional-compilation.html -[derive mode macro]: procedural-macros.html#derive-mode-macros -[trait]: items/traits.html -[main]: crates-and-source-files.html +[item declarations]: items.md +[generics]: items/generics.md +[implementations]: items/implementations.md +[modules]: items/modules.md +[statements]: statements.md +[match expressions]: expressions/match-expr.md +[external blocks]: items/external-blocks.md +[items]: items.md +[attribute macro]: procedural-macros.md#attribute-macros +[function-like macro]: procedural-macros.md#function-like-procedural-macros +[conditional compilation]: conditional-compilation.md +[derive mode macro]: procedural-macros.md#derive-mode-macros +[trait]: items/traits.md +[main]: crates-and-source-files.md [`Termination`]: ../std/process/trait.Termination.html -[where clause]: items/where-clauses.html -[trait or lifetime bounds]: trait-bounds.html -[Expression Attributes]: expressions.html#expression-attributes +[where clause]: items/where-clauses.md +[trait or lifetime bounds]: trait-bounds.md +[Expression Attributes]: expressions.md#expression-attributes diff --git a/src/comments.md b/src/comments.md index d8be2fef4..1d85e88d5 100644 --- a/src/comments.md +++ b/src/comments.md @@ -122,4 +122,4 @@ pub mod outer_module { } ``` -[attributes]: attributes.html +[attributes]: attributes.md diff --git a/src/conditional-compilation.md b/src/conditional-compilation.md index 2a8a8da5f..83617076c 100644 --- a/src/conditional-compilation.md +++ b/src/conditional-compilation.md @@ -295,19 +295,19 @@ let machine_kind = if cfg!(unix) { println!("I'm running on a {} machine!", machine_kind); ``` -[IDENTIFIER]: identifiers.html -[RAW_STRING_LITERAL]: tokens.html#raw-string-literals -[STRING_LITERAL]: tokens.html#string-literals -[_MetaItem_]: attributes.html +[IDENTIFIER]: identifiers.md +[RAW_STRING_LITERAL]: tokens.md#raw-string-literals +[STRING_LITERAL]: tokens.md#string-literals +[_MetaItem_]: attributes.md [`--cfg`]: ../rustc/command-line-arguments.html#a--cfg-configure-the-compilation-environment [`--test`]: ../rustc/command-line-arguments.html#a--test-build-a-test-harness [`cfg`]: #the-cfg-attribute [`cfg` macro]: #the-cfg-macro [`cfg_attr`]: #the-cfg_attr-attribute [`debug_assert!`]: ../std/macro.debug_assert.html -[attribute]: attributes.html -[attributes]: attributes.html -[crate type]: linkage.html -[expressions]: expressions.html -[items]: items.html -[metaitem]: attributes.html +[attribute]: attributes.md +[attributes]: attributes.md +[crate type]: linkage.md +[expressions]: expressions.md +[items]: items.md +[metaitem]: attributes.md diff --git a/src/const_eval.md b/src/const_eval.md index 8b235dd9f..d4e0c72ec 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -57,38 +57,38 @@ A _const context_ is one of the following: * [statics] * [enum discriminants] -[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators -[array expressions]: expressions/array-expr.html -[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions -[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions -[array type length expressions]: types/array.html -[assignment expressions]: expressions/operator-expr.html#assignment-expressions -[assignment operator expressions]: expressions/operator-expr.html#compound-assignment-expressions -[block expressions]: expressions/block-expr.html -[borrow]: expressions/operator-expr.html#borrow-operators -[cast]: expressions/operator-expr.html#type-cast-expressions -[closure expressions]: expressions/closure-expr.html -[comparison]: expressions/operator-expr.html#comparison-operators -[constants]: items/constant-items.html -[dereference operator]: expressions/operator-expr.html#the-dereference-operator -[destructors]: destructors.html -[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations -[enum variant]: expressions/enum-variant-expr.html -[expression statements]: statements.html#expression-statements -[expressions]: expressions.html -[field]: expressions/field-expr.html -[functions]: items/functions.html -[grouped]: expressions/grouped-expr.html -[interior mutability]: interior-mutability.html -[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators -[let statements]: statements.html#let-statements -[literals]: expressions/literal-expr.html -[negation]: expressions/operator-expr.html#negation-operators -[overflow]: expressions/operator-expr.html#overflow -[paths]: expressions/path-expr.html -[patterns]: patterns.html -[range expressions]: expressions/range-expr.html -[slice]: types/slice.html -[statics]: items/static-items.html -[struct]: expressions/struct-expr.html -[tuple expressions]: expressions/tuple-expr.html +[arithmetic, logical]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators +[array expressions]: expressions/array-expr.md +[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions +[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions +[array type length expressions]: types/array.md +[assignment expressions]: expressions/operator-expr.md#assignment-expressions +[assignment operator expressions]: expressions/operator-expr.md#compound-assignment-expressions +[block expressions]: expressions/block-expr.md +[borrow]: expressions/operator-expr.md#borrow-operators +[cast]: expressions/operator-expr.md#type-cast-expressions +[closure expressions]: expressions/closure-expr.md +[comparison]: expressions/operator-expr.md#comparison-operators +[constants]: items/constant-items.md +[dereference operator]: expressions/operator-expr.md#the-dereference-operator +[destructors]: destructors.md +[enum discriminants]: items/enumerations.md#custom-discriminant-values-for-field-less-enumerations +[enum variant]: expressions/enum-variant-expr.md +[expression statements]: statements.md#expression-statements +[expressions]: expressions.md +[field]: expressions/field-expr.md +[functions]: items/functions.md +[grouped]: expressions/grouped-expr.md +[interior mutability]: interior-mutability.md +[lazy boolean]: expressions/operator-expr.md#lazy-boolean-operators +[let statements]: statements.md#let-statements +[literals]: expressions/literal-expr.md +[negation]: expressions/operator-expr.md#negation-operators +[overflow]: expressions/operator-expr.md#overflow +[paths]: expressions/path-expr.md +[patterns]: patterns.md +[range expressions]: expressions/range-expr.md +[slice]: types/slice.md +[statics]: items/static-items.md +[struct]: expressions/struct-expr.md +[tuple expressions]: expressions/tuple-expr.md diff --git a/src/crates-and-source-files.md b/src/crates-and-source-files.md index 89599d68b..c4919168d 100644 --- a/src/crates-and-source-files.md +++ b/src/crates-and-source-files.md @@ -133,22 +133,22 @@ type must be one of the following: ECMA-335 CLI model, a *library* in the SML/NJ Compilation Manager, a *unit* in the Owens and Flatt module system, or a *configuration* in Mesa. -[_InnerAttribute_]: attributes.html -[_Item_]: items.html +[_InnerAttribute_]: attributes.md +[_Item_]: items.md [_shebang_]: https://en.wikipedia.org/wiki/Shebang_(Unix) [_utf8 byte order mark_]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8 [`Termination`]: ../std/process/trait.Termination.html [`core`]: ../core/index.html [`core::prelude::v1`]: ../core/prelude/index.html -[`extern crate`]: items/extern-crates.html +[`extern crate`]: items/extern-crates.md [`std`]: ../std/index.html [`std::prelude::v1`]: ../std/prelude/index.html -[`use` declaration]: items/use-declarations.html -[attribute]: attributes.html -[attributes]: attributes.html -[function]: items/functions.html -[module]: items/modules.html -[module path]: paths.html -[trait or lifetime bounds]: trait-bounds.html -[unit]: types.html#tuple-types -[where clauses]: items/generics.html#where-clauses +[`use` declaration]: items/use-declarations.md +[attribute]: attributes.md +[attributes]: attributes.md +[function]: items/functions.md +[module]: items/modules.md +[module path]: paths.md +[trait or lifetime bounds]: trait-bounds.md +[unit]: types.md#tuple-types +[where clauses]: items/generics.md#where-clauses diff --git a/src/destructors.md b/src/destructors.md index 1f0055f94..7c4a63409 100644 --- a/src/destructors.md +++ b/src/destructors.md @@ -76,18 +76,18 @@ Not running destructors in Rust is safe even if it has a type that isn't `'static`. [`std::mem::ManuallyDrop`] provides a wrapper to prevent a variable or field from being dropped automatically. -[initialized]: glossary.html#initialized -[variable]: variables.html -[temporary]: expressions.html#temporary-lifetimes -[Assignment]: expressions/operator-expr.html#assignment-expressions +[initialized]: glossary.md#initialized +[variable]: variables.md +[temporary]: expressions.md#temporary-lifetimes +[Assignment]: expressions/operator-expr.md#assignment-expressions [`std::ops::Drop::drop`]: ../std/ops/trait.Drop.html [RFC 1857]: https://github.com/rust-lang/rfcs/blob/master/text/1857-stabilize-drop-order.md -[struct]: types/struct.html -[tuple]: types/tuple.html -[enum variant]: types/enum.html -[array]: types/array.html -[closure]: types/closure.html -[Trait objects]: types/trait-object.html +[struct]: types/struct.md +[tuple]: types/tuple.md +[enum variant]: types/enum.md +[array]: types/array.md +[closure]: types/closure.md +[Trait objects]: types/trait-object.md [`std::ptr::drop_in_place`]: ../std/ptr/fn.drop_in_place.html [`std::mem::forget`]: ../std/mem/fn.forget.html [`std::mem::ManuallyDrop`]: ../std/mem/struct.ManuallyDrop.html diff --git a/src/dynamically-sized-types.md b/src/dynamically-sized-types.md index 7fd25ab30..39154a2b5 100644 --- a/src/dynamically-sized-types.md +++ b/src/dynamically-sized-types.md @@ -23,10 +23,10 @@ types">DSTs. Such types can only be used in certain cases: Notably: [variables], function parameters, [const] and [static] items must be `Sized`. -[sized]: special-types-and-traits.html#sized -[Slices]: types/slice.html -[trait objects]: types/trait-object.html -[Pointer types]: types/pointer.html -[variables]: variables.html -[const]: items/constant-items.html -[static]: items/static-items.html +[sized]: special-types-and-traits.md#sized +[Slices]: types/slice.md +[trait objects]: types/trait-object.md +[Pointer types]: types/pointer.md +[variables]: variables.md +[const]: items/constant-items.md +[static]: items/static-items.md diff --git a/src/expressions.md b/src/expressions.md index f30eb37c1..82ff7e5aa 100644 --- a/src/expressions.md +++ b/src/expressions.md @@ -281,86 +281,86 @@ They are never allowed before: [_AssignmentExpression_], [_CompoundAssignmentExpression_]). -[block expressions]: expressions/block-expr.html -[call expressions]: expressions/call-expr.html -[closure expressions]: expressions/closure-expr.html -[enum variant]: expressions/enum-variant-expr.html -[field]: expressions/field-expr.html -[functional update]: expressions/struct-expr.html#functional-update-syntax -[grouped]: expressions/grouped-expr.html -[`if let`]: expressions/if-expr.html#if-let-expressions -[literals]: expressions/literal-expr.html -[match]: expressions/match-expr.html -[method-call]: expressions/method-call-expr.html -[paths]: expressions/path-expr.html -[range expressions]: expressions/range-expr.html -[struct]: expressions/struct-expr.html -[tuple expressions]: expressions/tuple-expr.html -[`while let`]: expressions/loop-expr.html#predicate-pattern-loops - -[array expressions]: expressions/array-expr.html -[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions - -[arithmetic, logical]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators -[assign]: expressions/operator-expr.html#assignment-expressions -[borrow]: expressions/operator-expr.html#borrow-operators -[cast]: expressions/operator-expr.html#type-cast-expressions -[comparison]: expressions/operator-expr.html#comparison-operators -[compound assignment]: expressions/operator-expr.html#compound-assignment-expressions -[deref]: expressions/operator-expr.html#the-dereference-operator -[lazy boolean]: expressions/operator-expr.html#lazy-boolean-operators -[negation]: expressions/operator-expr.html#negation-operators -[overflow]: expressions/operator-expr.html#overflow - -[destructors]: destructors.html -[interior mutability]: interior-mutability.html +[block expressions]: expressions/block-expr.md +[call expressions]: expressions/call-expr.md +[closure expressions]: expressions/closure-expr.md +[enum variant]: expressions/enum-variant-expr.md +[field]: expressions/field-expr.md +[functional update]: expressions/struct-expr.md#functional-update-syntax +[grouped]: expressions/grouped-expr.md +[`if let`]: expressions/if-expr.md#if-let-expressions +[literals]: expressions/literal-expr.md +[match]: expressions/match-expr.md +[method-call]: expressions/method-call-expr.md +[paths]: expressions/path-expr.md +[range expressions]: expressions/range-expr.md +[struct]: expressions/struct-expr.md +[tuple expressions]: expressions/tuple-expr.md +[`while let`]: expressions/loop-expr.md#predicate-pattern-loops + +[array expressions]: expressions/array-expr.md +[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions + +[arithmetic, logical]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators +[assign]: expressions/operator-expr.md#assignment-expressions +[borrow]: expressions/operator-expr.md#borrow-operators +[cast]: expressions/operator-expr.md#type-cast-expressions +[comparison]: expressions/operator-expr.md#comparison-operators +[compound assignment]: expressions/operator-expr.md#compound-assignment-expressions +[deref]: expressions/operator-expr.md#the-dereference-operator +[lazy boolean]: expressions/operator-expr.md#lazy-boolean-operators +[negation]: expressions/operator-expr.md#negation-operators +[overflow]: expressions/operator-expr.md#overflow + +[destructors]: destructors.md +[interior mutability]: interior-mutability.md [`Box`]: ../std/boxed/struct.Box.html -[`Copy`]: special-types-and-traits.html#copy -[`Drop`]: special-types-and-traits.html#drop -[`Sized`]: special-types-and-traits.html#sized +[`Copy`]: special-types-and-traits.md#copy +[`Drop`]: special-types-and-traits.md#drop +[`Sized`]: special-types-and-traits.md#sized [implicit borrow]: #implicit-borrows [implicitly mutably borrowed]: #implicit-borrows -[let]: statements.html#let-statements -[let statement]: statements.html#let-statements -[Mutable `static` items]: items/static-items.html#mutable-statics -[const contexts]: const_eval.html -[scrutinee]: glossary.html#scrutinee -[slice]: types/slice.html -[statement]: statements.html -[static variables]: items/static-items.html +[let]: statements.md#let-statements +[let statement]: statements.md#let-statements +[Mutable `static` items]: items/static-items.md#mutable-statics +[const contexts]: const_eval.md +[scrutinee]: glossary.md#scrutinee +[slice]: types/slice.md +[statement]: statements.md +[static variables]: items/static-items.md [Temporary values]: #temporary-lifetimes -[Variables]: variables.html - - -[_ArithmeticOrLogicalExpression_]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators -[_ArrayExpression_]: expressions/array-expr.html -[_AssignmentExpression_]: expressions/operator-expr.html#assignment-expressions -[_BlockExpression_]: expressions/block-expr.html -[_BreakExpression_]: expressions/loop-expr.html#break-expressions -[_CallExpression_]: expressions/call-expr.html -[_ClosureExpression_]: expressions/closure-expr.html -[_ComparisonExpression_]: expressions/operator-expr.html#comparison-operators -[_CompoundAssignmentExpression_]: expressions/operator-expr.html#compound-assignment-expressions -[_ContinueExpression_]: expressions/loop-expr.html#continue-expressions -[_EnumerationVariantExpression_]: expressions/enum-variant-expr.html -[_FieldExpression_]: expressions/field-expr.html -[_GroupedExpression_]: expressions/grouped-expr.html -[_IfExpression_]: expressions/if-expr.html#if-expressions -[_IfLetExpression_]: expressions/if-expr.html#if-let-expressions -[_IndexExpression_]: expressions/array-expr.html#array-and-slice-indexing-expressions -[_LazyBooleanExpression_]: expressions/operator-expr.html#lazy-boolean-operators -[_LiteralExpression_]: expressions/literal-expr.html -[_LoopExpression_]: expressions/loop-expr.html -[_MacroInvocation_]: macros.html#macro-invocation -[_MatchExpression_]: expressions/match-expr.html -[_MethodCallExpression_]: expressions/method-call-expr.html -[_OperatorExpression_]: expressions/operator-expr.html -[_OuterAttribute_]: attributes.html -[_PathExpression_]: expressions/path-expr.html -[_RangeExpression_]: expressions/range-expr.html -[_ReturnExpression_]: expressions/return-expr.html -[_StructExpression_]: expressions/struct-expr.html -[_TupleExpression_]: expressions/tuple-expr.html -[_TupleIndexingExpression_]: expressions/tuple-expr.html#tuple-indexing-expressions -[_TypeCastExpression_]: expressions/operator-expr.html#type-cast-expressions -[_UnsafeBlockExpression_]: expressions/block-expr.html#unsafe-blocks +[Variables]: variables.md + + +[_ArithmeticOrLogicalExpression_]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators +[_ArrayExpression_]: expressions/array-expr.md +[_AssignmentExpression_]: expressions/operator-expr.md#assignment-expressions +[_BlockExpression_]: expressions/block-expr.md +[_BreakExpression_]: expressions/loop-expr.md#break-expressions +[_CallExpression_]: expressions/call-expr.md +[_ClosureExpression_]: expressions/closure-expr.md +[_ComparisonExpression_]: expressions/operator-expr.md#comparison-operators +[_CompoundAssignmentExpression_]: expressions/operator-expr.md#compound-assignment-expressions +[_ContinueExpression_]: expressions/loop-expr.md#continue-expressions +[_EnumerationVariantExpression_]: expressions/enum-variant-expr.md +[_FieldExpression_]: expressions/field-expr.md +[_GroupedExpression_]: expressions/grouped-expr.md +[_IfExpression_]: expressions/if-expr.md#if-expressions +[_IfLetExpression_]: expressions/if-expr.md#if-let-expressions +[_IndexExpression_]: expressions/array-expr.md#array-and-slice-indexing-expressions +[_LazyBooleanExpression_]: expressions/operator-expr.md#lazy-boolean-operators +[_LiteralExpression_]: expressions/literal-expr.md +[_LoopExpression_]: expressions/loop-expr.md +[_MacroInvocation_]: macros.md#macro-invocation +[_MatchExpression_]: expressions/match-expr.md +[_MethodCallExpression_]: expressions/method-call-expr.md +[_OperatorExpression_]: expressions/operator-expr.md +[_OuterAttribute_]: attributes.md +[_PathExpression_]: expressions/path-expr.md +[_RangeExpression_]: expressions/range-expr.md +[_ReturnExpression_]: expressions/return-expr.md +[_StructExpression_]: expressions/struct-expr.md +[_TupleExpression_]: expressions/tuple-expr.md +[_TupleIndexingExpression_]: expressions/tuple-expr.md#tuple-indexing-expressions +[_TypeCastExpression_]: expressions/operator-expr.md#type-cast-expressions +[_UnsafeBlockExpression_]: expressions/block-expr.md#unsafe-blocks diff --git a/src/expressions/array-expr.md b/src/expressions/array-expr.md index f23c148b4..9d3d0e299 100644 --- a/src/expressions/array-expr.md +++ b/src/expressions/array-expr.md @@ -18,11 +18,11 @@ order they are written. Alternatively there can be exactly two expressions inside the brackets, separated by a semi-colon. The expression after the `;` must be a have type `usize` and be a [constant expression], such as a -[literal](../tokens.html#literals) or a [constant -item](../items/constant-items.html). `[a; b]` creates an array containing `b` +[literal](../tokens.md#literals) or a [constant +item](../items/constant-items.md). `[a; b]` creates an array containing `b` copies of the value of `a`. If the expression after the semi-colon has a value greater than 1 then this requires that the type of `a` is -[`Copy`](../special-types-and-traits.html#copy). +[`Copy`](../special-types-and-traits.md#copy). ```rust [1, 2, 3, 4]; @@ -43,7 +43,7 @@ expressions]. > **Syntax**\ > _IndexExpression_ :\ -[Array][array] and [slice](../types/slice.html)-typed expressions can be +[Array][array] and [slice](../types/slice.md)-typed expressions can be indexed by writing a square-bracket-enclosed expression of type `usize` (the index) after them. When the array is mutable, the resulting [memory location] can be assigned to. @@ -80,12 +80,12 @@ arr[10]; // warning: index out of bounds The array index expression can be implemented for types other than arrays and slices by implementing the [Index] and [IndexMut] traits. -[array]: ../types/array.html +[array]: ../types/array.md [IndexMut]: ../../std/ops/trait.IndexMut.html [Index]: ../../std/ops/trait.Index.html -[Inner attributes]: ../attributes.html -[_Expression_]: ../expressions.html -[_InnerAttribute_]: ../attributes.html -[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions -[constant expression]: ../const_eval.html#constant-expressions -[memory location]: ../expressions.html#place-expressions-and-value-expressions +[Inner attributes]: ../attributes.md +[_Expression_]: ../expressions.md +[_InnerAttribute_]: ../attributes.md +[attributes on block expressions]: ../expressions/block-expr.md#attributes-on-block-expressions +[constant expression]: ../const_eval.md#constant-expressions +[memory location]: ../expressions.md#place-expressions-and-value-expressions diff --git a/src/expressions/block-expr.md b/src/expressions/block-expr.md index a6375ef17..d33954af8 100644 --- a/src/expressions/block-expr.md +++ b/src/expressions/block-expr.md @@ -86,7 +86,7 @@ fn move_by_block_expression() { > _UnsafeBlockExpression_ :\ >    `unsafe` _BlockExpression_ -_See [`unsafe` block](../unsafe-blocks.html) for more information on when to use +_See [`unsafe` block](../unsafe-blocks.md) for more information on when to use `unsafe`_ A block of code can be prefixed with the `unsafe` keyword to permit [unsafe @@ -130,26 +130,26 @@ fn is_unix_platform() -> bool { } ``` -[_ExpressionWithoutBlock_]: ../expressions.html -[_InnerAttribute_]: ../attributes.html -[_Statement_]: ../statements.html -[`cfg`]: ../conditional-compilation.html -[`for`]: ../expressions/loop-expr.html#iterator-loops -[`loop`]: ../expressions/loop-expr.html#infinite-loops -[`while let`]: ../expressions/loop-expr.html#predicate-pattern-loops -[`while`]: ../expressions/loop-expr.html#predicate-loops -[array expressions]: ../expressions/array-expr.html -[call expressions]: ../expressions/call-expr.html -[enum variant]: ../expressions/enum-variant-expr.html -[expression attributes]: ../expressions.html#expression-attributes -[expression]: ../expressions.html -[function]: ../items/functions.html -[inner attributes]: ../attributes.html -[method]: ../items/associated-items.html#methods -[statement]: ../statements.html -[statements]: ../statements.html -[struct]: ../expressions/struct-expr.html -[the lint check attributes]: ../attributes.html#lint-check-attributes -[tuple expressions]: ../expressions/tuple-expr.html -[unsafe operations]: ../unsafety.html -[value expressions]: ../expressions.html#place-expressions-and-value-expressions +[_ExpressionWithoutBlock_]: ../expressions.md +[_InnerAttribute_]: ../attributes.md +[_Statement_]: ../statements.md +[`cfg`]: ../conditional-compilation.md +[`for`]: ../expressions/loop-expr.md#iterator-loops +[`loop`]: ../expressions/loop-expr.md#infinite-loops +[`while let`]: ../expressions/loop-expr.md#predicate-pattern-loops +[`while`]: ../expressions/loop-expr.md#predicate-loops +[array expressions]: ../expressions/array-expr.md +[call expressions]: ../expressions/call-expr.md +[enum variant]: ../expressions/enum-variant-expr.md +[expression attributes]: ../expressions.md#expression-attributes +[expression]: ../expressions.md +[function]: ../items/functions.md +[inner attributes]: ../attributes.md +[method]: ../items/associated-items.md#methods +[statement]: ../statements.md +[statements]: ../statements.md +[struct]: ../expressions/struct-expr.md +[the lint check attributes]: ../attributes.md#lint-check-attributes +[tuple expressions]: ../expressions/tuple-expr.md +[unsafe operations]: ../unsafety.md +[value expressions]: ../expressions.md#place-expressions-and-value-expressions diff --git a/src/expressions/call-expr.md b/src/expressions/call-expr.md index eb1172f20..f05626137 100644 --- a/src/expressions/call-expr.md +++ b/src/expressions/call-expr.md @@ -10,7 +10,7 @@ A _call expression_ consists of an expression followed by a parenthesized expression-list. It invokes a function, providing zero or more input variables. If the function eventually returns, then the expression completes. For -[non-function types](../types/function-item.html), the expression f(...) uses +[non-function types](../types/function-item.md), the expression f(...) uses the method on one of the [`std::ops::Fn`], [`std::ops::FnMut`] or [`std::ops::FnOnce`] traits, which differ in whether they take the type by reference, mutable reference, or take ownership respectively. An automatic @@ -97,5 +97,5 @@ Refer to [RFC 132] for further details and motivations. [`std::ops::FnMut`]: ../../std/ops/trait.FnMut.html [`std::ops::FnOnce`]: ../../std/ops/trait.FnOnce.html [RFC 132]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md -[non-function types]: ../types.html#function-item-types -[_Expression_]: ../expressions.html +[non-function types]: ../types.md#function-item-types +[_Expression_]: ../expressions.md diff --git a/src/expressions/closure-expr.md b/src/expressions/closure-expr.md index 8b8d1a236..74919566e 100644 --- a/src/expressions/closure-expr.md +++ b/src/expressions/closure-expr.md @@ -32,7 +32,7 @@ functions, as an abbreviation for defining and capturing a separate function. Significantly, closure expressions _capture their environment_, which regular [function definitions] do not. Without the `move` keyword, the closure expression [infers how it captures each variable from its -environment](../types/closure.html#capture-modes), preferring to capture by shared +environment](../types/closure.md#capture-modes), preferring to capture by shared reference, effectively borrowing all outer variables mentioned inside the closure's body. If needed the compiler will infer that instead mutable references should be taken, or that the values should be moved or copied @@ -42,10 +42,10 @@ capture its environment by copying or moving values by prefixing it with the closure's type is `'static`. The compiler will determine which of the [closure -traits](../types/closure.html#call-traits-and-coercions) the closure's type will +traits](../types/closure.md#call-traits-and-coercions) the closure's type will implement by how it acts on its captured variables. The closure will also -implement [`Send`](../special-types-and-traits.html#send) and/or -[`Sync`](../special-types-and-traits.html#sync) if all of its captured types do. +implement [`Send`](../special-types-and-traits.md#send) and/or +[`Sync`](../special-types-and-traits.md#sync) if all of its captured types do. These traits allow functions to accept closures using generics, even though the exact types can't be named. @@ -68,13 +68,13 @@ let word = "konnichiwa".to_owned(); ten_times(move |j| println!("{}, {}", word, j)); ``` -[block]: ../expressions/block-expr.html -[function definitions]: ../items/functions.html -[patterns]: ../patterns.html -[_Expression_]: ../expressions.html -[_BlockExpression_]: ../expressions/block-expr.html -[_TypeNoBounds_]: ../types.html#type-expressions -[_FunctionParameters_]: ../items/functions.html -[_Pattern_]: ../patterns.html -[_Type_]: ../types.html#type-expressions -[`let` binding]: ../statements.html#let-statements +[block]: ../expressions/block-expr.md +[function definitions]: ../items/functions.md +[patterns]: ../patterns.md +[_Expression_]: ../expressions.md +[_BlockExpression_]: ../expressions/block-expr.md +[_TypeNoBounds_]: ../types.md#type-expressions +[_FunctionParameters_]: ../items/functions.md +[_Pattern_]: ../patterns.md +[_Type_]: ../types.md#type-expressions +[`let` binding]: ../statements.md#let-statements diff --git a/src/expressions/enum-variant-expr.md b/src/expressions/enum-variant-expr.md index 21ae98a21..68852f257 100644 --- a/src/expressions/enum-variant-expr.md +++ b/src/expressions/enum-variant-expr.md @@ -40,8 +40,8 @@ let m = Message::Move { x: 50, y: 200 }; Enum variant expressions have the same syntax, behavior, and restrictions as [struct expressions][structs], except they do not support base update with the `..` syntax. -[IDENTIFIER]: ../identifiers.html -[TUPLE_INDEX]: ../tokens.html#integer-literals -[_Expression_]: ../expressions.html -[_PathInExpression_]: ../paths.html#paths-in-expressions -[structs]: ../expressions/struct-expr.html +[IDENTIFIER]: ../identifiers.md +[TUPLE_INDEX]: ../tokens.md#integer-literals +[_Expression_]: ../expressions.md +[_PathInExpression_]: ../paths.md#paths-in-expressions +[structs]: ../expressions/struct-expr.md diff --git a/src/expressions/field-expr.md b/src/expressions/field-expr.md index 598fb3d7f..cb5e55360 100644 --- a/src/expressions/field-expr.md +++ b/src/expressions/field-expr.md @@ -45,11 +45,11 @@ let c: &String = &x.f2; // Can borrow again let d: String = x.f3; // Move out of x.f3 ``` -[_Expression_]: ../expressions.html -[IDENTIFIER]: ../identifiers.html -[method call expression]: ../expressions/method-call-expr.html -[struct]: ../items/structs.html -[union]: ../items/unions.html -[place expression]: ../expressions.html#place-expressions-and-value-expressions -[mutable]: ../expressions.html#mutability -[`Drop`]: ../special-types-and-traits.html#drop +[_Expression_]: ../expressions.md +[IDENTIFIER]: ../identifiers.md +[method call expression]: ../expressions/method-call-expr.md +[struct]: ../items/structs.md +[union]: ../items/unions.md +[place expression]: ../expressions.md#place-expressions-and-value-expressions +[mutable]: ../expressions.md#mutability +[`Drop`]: ../special-types-and-traits.md#drop diff --git a/src/expressions/grouped-expr.md b/src/expressions/grouped-expr.md index fe19ed3d2..a687a2481 100644 --- a/src/expressions/grouped-expr.md +++ b/src/expressions/grouped-expr.md @@ -41,7 +41,7 @@ assert_eq!((a.f)(), "The field f"); group expression in the same expression contexts as [attributes on block expressions]. -[Inner attributes]: ../attributes.html -[_Expression_]: ../expressions.html -[_InnerAttribute_]: ../attributes.html -[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions +[Inner attributes]: ../attributes.md +[_Expression_]: ../expressions.md +[_InnerAttribute_]: ../attributes.md +[attributes on block expressions]: ../expressions/block-expr.md#attributes-on-block-expressions diff --git a/src/expressions/if-expr.md b/src/expressions/if-expr.md index d29f5520a..fdb2719fb 100644 --- a/src/expressions/if-expr.md +++ b/src/expressions/if-expr.md @@ -149,10 +149,10 @@ if let PAT = EXPR || EXPR { .. } if let PAT = ( EXPR || EXPR ) { .. } ``` -[_BlockExpression_]: ../expressions/block-expr.html -[_Expression_]: ../expressions.html -[_LazyBooleanOperatorExpression_]: ../expressions/operator-expr.html#lazy-boolean-operators -[_MatchArmPatterns_]: ../expressions/match-expr.html +[_BlockExpression_]: ../expressions/block-expr.md +[_Expression_]: ../expressions.md +[_LazyBooleanOperatorExpression_]: ../expressions/operator-expr.md#lazy-boolean-operators +[_MatchArmPatterns_]: ../expressions/match-expr.md [_eRFCIfLetChain_]: https://github.com/rust-lang/rfcs/blob/master/text/2497-if-let-chains.md#rollout-plan-and-transitioning-to-rust-2018 -[`match` expression]: ../expressions/match-expr.html -[scrutinee]: ../glossary.html#scrutinee +[`match` expression]: ../expressions/match-expr.md +[scrutinee]: ../glossary.md#scrutinee diff --git a/src/expressions/literal-expr.md b/src/expressions/literal-expr.md index f6b6b0f2a..287499eb1 100644 --- a/src/expressions/literal-expr.md +++ b/src/expressions/literal-expr.md @@ -21,13 +21,13 @@ It directly describes a number, character, string, or boolean value. 5; // integer type ``` -[CHAR_LITERAL]: ../tokens.html#character-literals -[STRING_LITERAL]: ../tokens.html#string-literals -[RAW_STRING_LITERAL]: ../tokens.html#raw-string-literals -[BYTE_LITERAL]: ../tokens.html#byte-literals -[BYTE_STRING_LITERAL]: ../tokens.html#byte-string-literals -[RAW_BYTE_STRING_LITERAL]: ../tokens.html#raw-byte-string-literals -[INTEGER_LITERAL]: ../tokens.html#integer-literals -[FLOAT_LITERAL]: ../tokens.html#floating-point-literals -[BOOLEAN_LITERAL]: ../tokens.html#boolean-literals -[literal]: ../tokens.html#literals +[CHAR_LITERAL]: ../tokens.md#character-literals +[STRING_LITERAL]: ../tokens.md#string-literals +[RAW_STRING_LITERAL]: ../tokens.md#raw-string-literals +[BYTE_LITERAL]: ../tokens.md#byte-literals +[BYTE_STRING_LITERAL]: ../tokens.md#byte-string-literals +[RAW_BYTE_STRING_LITERAL]: ../tokens.md#raw-byte-string-literals +[INTEGER_LITERAL]: ../tokens.md#integer-literals +[FLOAT_LITERAL]: ../tokens.md#floating-point-literals +[BOOLEAN_LITERAL]: ../tokens.md#boolean-literals +[literal]: ../tokens.md#literals diff --git a/src/expressions/loop-expr.md b/src/expressions/loop-expr.md index c7f9320de..798957990 100644 --- a/src/expressions/loop-expr.md +++ b/src/expressions/loop-expr.md @@ -31,7 +31,7 @@ A `loop` expression repeats execution of its body continuously: `loop { println!("I live."); }`. A `loop` expression without an associated `break` expression is diverging and -has type [`!`](../types/never.html). A `loop` expression containing associated +has type [`!`](../types/never.md). A `loop` expression containing associated [`break` expression(s)](#break-expressions) may terminate, and must have type compatible with the value of the `break` expression(s). @@ -275,12 +275,12 @@ and the `loop` must have a type compatible with each `break` expression. `break` without an expression is considered identical to `break` with expression `()`. -[IDENTIFIER]: ../identifiers.html -[LIFETIME_OR_LABEL]: ../tokens.html#lifetimes-and-loop-labels -[_BlockExpression_]: ../expressions/block-expr.html -[_Expression_]: ../expressions.html -[_MatchArmPatterns_]: ../expressions/match-expr.html -[_Pattern_]: ../patterns.html -[`match` expression]: ../expressions/match-expr.html -[scrutinee]: ../glossary.html#scrutinee -[temporary values]: ../expressions.html#temporary-lifetimes +[IDENTIFIER]: ../identifiers.md +[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels +[_BlockExpression_]: ../expressions/block-expr.md +[_Expression_]: ../expressions.md +[_MatchArmPatterns_]: ../expressions/match-expr.md +[_Pattern_]: ../patterns.md +[`match` expression]: ../expressions/match-expr.md +[scrutinee]: ../glossary.md#scrutinee +[temporary values]: ../expressions.md#temporary-lifetimes diff --git a/src/expressions/match-expr.md b/src/expressions/match-expr.md index eede6fc71..67a17040b 100644 --- a/src/expressions/match-expr.md +++ b/src/expressions/match-expr.md @@ -134,24 +134,24 @@ meaning on match arms are [`cfg`], `cold`, and the [lint check attributes]. expression in the same expression contexts as [attributes on block expressions]. -[_Expression_]: ../expressions.html -[_BlockExpression_]: ../expressions/block-expr.html#block-expressions -[place expression]: ../expressions.html#place-expressions-and-value-expressions -[value expression]: ../expressions.html#place-expressions-and-value-expressions -[_InnerAttribute_]: ../attributes.html -[_OuterAttribute_]: ../attributes.html -[`cfg`]: ../conditional-compilation.html -[lint check attributes]: ../attributes.html#lint-check-attributes -[Range Expression]: ../expressions/range-expr.html - -[_Pattern_]: ../patterns.html -[pattern]: ../patterns.html -[Identifier Patterns]: ../patterns.html#identifier-patterns -[Inner attributes]: ../attributes.html -[Struct Patterns]: ../patterns.html#struct-patterns -[Tuple Struct Patterns]: ../patterns.html#tuplestruct-patterns -[Tuple Patterns]: ../patterns.html#tuple-patterns -[Range Pattern]: ../patterns.html#range-patterns -[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions -[binding mode]: ../patterns.html#binding-modes -[scrutinee]: ../glossary.html#scrutinee +[_Expression_]: ../expressions.md +[_BlockExpression_]: ../expressions/block-expr.md#block-expressions +[place expression]: ../expressions.md#place-expressions-and-value-expressions +[value expression]: ../expressions.md#place-expressions-and-value-expressions +[_InnerAttribute_]: ../attributes.md +[_OuterAttribute_]: ../attributes.md +[`cfg`]: ../conditional-compilation.md +[lint check attributes]: ../attributes.md#lint-check-attributes +[Range Expression]: ../expressions/range-expr.md + +[_Pattern_]: ../patterns.md +[pattern]: ../patterns.md +[Identifier Patterns]: ../patterns.md#identifier-patterns +[Inner attributes]: ../attributes.md +[Struct Patterns]: ../patterns.md#struct-patterns +[Tuple Struct Patterns]: ../patterns.md#tuplestruct-patterns +[Tuple Patterns]: ../patterns.md#tuple-patterns +[Range Pattern]: ../patterns.md#range-patterns +[attributes on block expressions]: ../expressions/block-expr.md#attributes-on-block-expressions +[binding mode]: ../patterns.md#binding-modes +[scrutinee]: ../glossary.md#scrutinee diff --git a/src/expressions/method-call-expr.md b/src/expressions/method-call-expr.md index 1ee863be2..5f656c8c3 100644 --- a/src/expressions/method-call-expr.md +++ b/src/expressions/method-call-expr.md @@ -9,7 +9,7 @@ dot, an expression path segment, and a parenthesized expression-list. Method cal resolved to associated [methods] on specific traits, either statically dispatching to a method if the exact `self`-type of the left-hand-side is known, or dynamically dispatching if the left-hand-side expression is an indirect -[trait object](../types/trait-object.html). +[trait object](../types/trait-object.md). ```rust let pi: Result = "3.14".parse(); @@ -97,14 +97,14 @@ method and you'll be fine. -[_CallParams_]: ../expressions/call-expr.html -[_Expression_]: ../expressions.html -[_PathExprSegment_]: ../paths.html#paths-in-expressions -[visible]: ../visibility-and-privacy.html -[array]: ../types/array.html -[trait objects]: ../types/trait-object.html -[disambiguate call]: ../expressions/call-expr.html#disambiguating-function-calls -[disambiguating function call syntax]: ../expressions/call-expr.html#disambiguating-function-calls -[dereference]: ../expressions/operator-expr.html#the-dereference-operator -[methods]: ../items/associated-items.html#methods -[unsized coercion]: ../type-coercions.html#unsized-coercions +[_CallParams_]: ../expressions/call-expr.md +[_Expression_]: ../expressions.md +[_PathExprSegment_]: ../paths.md#paths-in-expressions +[visible]: ../visibility-and-privacy.md +[array]: ../types/array.md +[trait objects]: ../types/trait-object.md +[disambiguate call]: ../expressions/call-expr.md#disambiguating-function-calls +[disambiguating function call syntax]: ../expressions/call-expr.md#disambiguating-function-calls +[dereference]: ../expressions/operator-expr.md#the-dereference-operator +[methods]: ../items/associated-items.md#methods +[unsized coercion]: ../type-coercions.md#unsized-coercions diff --git a/src/expressions/operator-expr.md b/src/expressions/operator-expr.md index ca251f9b9..7ddcd48c4 100644 --- a/src/expressions/operator-expr.md +++ b/src/expressions/operator-expr.md @@ -85,14 +85,14 @@ let a = & & & & mut 10; >    `*` [_Expression_] The `*` (dereference) operator is also a unary prefix operator. When applied to -a [pointer](../types/pointer.html) it denotes the pointed-to location. If +a [pointer](../types/pointer.md) it denotes the pointed-to location. If the expression is of type `&mut T` and `*mut T`, and is either a local variable, a (nested) field of a local variable or is a mutable [place expression], then the resulting memory location can be assigned to. Dereferencing a raw pointer requires `unsafe`. On non-pointer types `*x` is equivalent to `*std::ops::Deref::deref(&x)` in an -[immutable place expression context](../expressions.html#mutability) and +[immutable place expression context](../expressions.md#mutability) and `*std::ops::Deref::deref_mut(&mut x)` in a mutable place expression context. ```rust @@ -331,7 +331,7 @@ fn average(values: &[f64]) -> f64 { } ``` -`as` can be used to explicitly perform [coercions](../type-coercions.html), as +`as` can be used to explicitly perform [coercions](../type-coercions.md), as well as the following additional casts. Here `*T` means either `*const T` or `*mut T`. @@ -345,7 +345,7 @@ well as the following additional casts. Here `*T` means either `*const T` or | `*T` where `T: Sized` | Numeric type | Pointer to address cast | | Integer type | `*V` where `V: Sized` | Address to pointer cast | | `&[T; n]` | `*const T` | Array to pointer cast | -| [Function pointer](../types/function-pointer.html) | `*V` where `V: Sized` | Function pointer to pointer cast | +| [Function pointer](../types/function-pointer.md) | `*V` where `V: Sized` | Function pointer to pointer cast | | Function pointer | Integer | Function pointer to address cast | | Closure \*\* | Function pointer | Closure to function pointer cast | @@ -398,10 +398,10 @@ An _assignment expression_ consists of a [place expression] followed by an equals sign (`=`) and a [value expression]. Such an expression always has the [`unit` type]. -Evaluating an assignment expression [drops](../destructors.html) the left-hand +Evaluating an assignment expression [drops](../destructors.md) the left-hand operand, unless it's an uninitialized local variable or field of a local variable, and [either copies or -moves](../expressions.html#moved-and-copied-types) its right-hand operand to its +moves](../expressions.md#moved-and-copied-types) its right-hand operand to its left-hand operand. The left-hand operand must be a place expression: using a value expression results in a compiler error, rather than promoting it to a temporary. @@ -442,12 +442,12 @@ x += 4; assert_eq!(x, 14); ``` -[place expression]: ../expressions.html#place-expressions-and-value-expressions -[value expression]: ../expressions.html#place-expressions-and-value-expressions -[temporary value]: ../expressions.html#temporary-lifetimes +[place expression]: ../expressions.md#place-expressions-and-value-expressions +[value expression]: ../expressions.md#place-expressions-and-value-expressions +[temporary value]: ../expressions.md#temporary-lifetimes [float-int]: https://github.com/rust-lang/rust/issues/10184 [float-float]: https://github.com/rust-lang/rust/issues/15536 -[`unit` type]: ../types/tuple.html +[`unit` type]: ../types/tuple.md [_BorrowExpression_]: #borrow-operators [_DereferenceExpression_]: #the-dereference-operator @@ -460,5 +460,5 @@ assert_eq!(x, 14); [_AssignmentExpression_]: #assignment-expressions [_CompoundAssignmentExpression_]: #compound-assignment-expressions -[_Expression_]: ../expressions.html -[_TypeNoBounds_]: ../types.html#type-expressions +[_Expression_]: ../expressions.md +[_TypeNoBounds_]: ../types.md#type-expressions diff --git a/src/expressions/path-expr.md b/src/expressions/path-expr.md index 7466aab97..945e09ebe 100644 --- a/src/expressions/path-expr.md +++ b/src/expressions/path-expr.md @@ -24,10 +24,10 @@ let push_integer = Vec::::push; let slice_reverse = <[i32]>::reverse; ``` -[_PathInExpression_]: ../paths.html#paths-in-expressions -[_QualifiedPathInExpression_]: ../paths.html#qualified-paths -[place expressions]: ../expressions.html#place-expressions-and-value-expressions -[value expressions]: ../expressions.html#place-expressions-and-value-expressions -[path]: ../paths.html -[`static mut`]: ../items/static-items.html#mutable-statics -[`unsafe` block]: ../expressions/block-expr.html#unsafe-blocks +[_PathInExpression_]: ../paths.md#paths-in-expressions +[_QualifiedPathInExpression_]: ../paths.md#qualified-paths +[place expressions]: ../expressions.md#place-expressions-and-value-expressions +[value expressions]: ../expressions.md#place-expressions-and-value-expressions +[path]: ../paths.md +[`static mut`]: ../items/static-items.md#mutable-statics +[`unsafe` block]: ../expressions/block-expr.md#unsafe-blocks diff --git a/src/expressions/range-expr.md b/src/expressions/range-expr.md index 74e789557..ed987b4c7 100644 --- a/src/expressions/range-expr.md +++ b/src/expressions/range-expr.md @@ -68,7 +68,7 @@ for i in 1..11 { } ``` -[_Expression_]: ../expressions.html +[_Expression_]: ../expressions.md [std::ops::Range]: ../../std/ops/struct.Range.html [std::ops::RangeFrom]: ../../std/ops/struct.RangeFrom.html [std::ops::RangeTo]: ../../std/ops/struct.RangeTo.html diff --git a/src/expressions/return-expr.md b/src/expressions/return-expr.md index ba6ac2c4d..1146b6e4f 100644 --- a/src/expressions/return-expr.md +++ b/src/expressions/return-expr.md @@ -20,4 +20,4 @@ fn max(a: i32, b: i32) -> i32 { } ``` -[_Expression_]: ../expressions.html +[_Expression_]: ../expressions.md diff --git a/src/expressions/struct-expr.md b/src/expressions/struct-expr.md index a045377a1..27acee0c4 100644 --- a/src/expressions/struct-expr.md +++ b/src/expressions/struct-expr.md @@ -138,21 +138,21 @@ let b = Gamma{}; // Exact same value as `a`. of a struct expression in the same expression contexts as [attributes on block expressions]. -[IDENTIFIER]: ../identifiers.html -[Inner attributes]: ../attributes.html -[TUPLE_INDEX]: ../tokens.html#integer-literals -[_Expression_]: ../expressions.html -[_InnerAttribute_]: ../attributes.html -[_PathInExpression_]: ../paths.html#paths-in-expressions -[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions -[call expression]: ../expressions/call-expr.html -[if let]: ../expressions/if-expr.html#if-let-expressions -[if]: ../expressions/if-expr.html#if-expressions -[loop]: ../expressions/loop-expr.html -[match]: ../expressions/match-expr.html +[IDENTIFIER]: ../identifiers.md +[Inner attributes]: ../attributes.md +[TUPLE_INDEX]: ../tokens.md#integer-literals +[_Expression_]: ../expressions.md +[_InnerAttribute_]: ../attributes.md +[_PathInExpression_]: ../paths.md#paths-in-expressions +[attributes on block expressions]: ../expressions/block-expr.md#attributes-on-block-expressions +[call expression]: ../expressions/call-expr.md +[if let]: ../expressions/if-expr.md#if-let-expressions +[if]: ../expressions/if-expr.md#if-expressions +[loop]: ../expressions/loop-expr.md +[match]: ../expressions/match-expr.md [parentheses]: http://localhost:3000/expressions/grouped-expr.html -[path]: ../paths.html -[struct]: ../items/structs.html -[union]: ../items/unions.html -[visible]: ../visibility-and-privacy.html -[scrutinee]: ../glossary.html#scrutinee +[path]: ../paths.md +[struct]: ../items/structs.md +[union]: ../items/unions.md +[visible]: ../visibility-and-privacy.md +[scrutinee]: ../glossary.md#scrutinee diff --git a/src/expressions/tuple-expr.md b/src/expressions/tuple-expr.md index e92ff85e4..a96a5dbfa 100644 --- a/src/expressions/tuple-expr.md +++ b/src/expressions/tuple-expr.md @@ -10,7 +10,7 @@ >    ( [_Expression_] `,` )+ [_Expression_]? Tuples are written by enclosing zero or more comma-separated expressions in -parentheses. They are used to create [tuple-typed](../types/tuple.html) values. +parentheses. They are used to create [tuple-typed](../types/tuple.md) values. ```rust (0.0, 4.5); @@ -38,9 +38,9 @@ expressions]. > _TupleIndexingExpression_ :\ >    [_Expression_] `.` [TUPLE_INDEX] -[Tuples](../types/tuple.html) and [struct tuples](../items/structs.html) can be +[Tuples](../types/tuple.md) and [struct tuples](../items/structs.md) can be indexed using the number corresponding to the position of the field. The index -must be written as a [decimal literal](../tokens.html#integer-literals) with no +must be written as a [decimal literal](../tokens.md#integer-literals) with no underscores or suffix. Tuple indexing expressions also differ from field expressions in that they can unambiguously be called as a function. In all other aspects they have the same behavior. @@ -53,8 +53,8 @@ let unit_x = Point(1.0, 0.0); assert_eq!(unit_x.0, 1.0); ``` -[Inner attributes]: ../attributes.html -[TUPLE_INDEX]: ../tokens.html#integer-literals -[_Expression_]: ../expressions.html -[_InnerAttribute_]: ../attributes.html -[attributes on block expressions]: ../expressions/block-expr.html#attributes-on-block-expressions +[Inner attributes]: ../attributes.md +[TUPLE_INDEX]: ../tokens.md#integer-literals +[_Expression_]: ../expressions.md +[_InnerAttribute_]: ../attributes.md +[attributes on block expressions]: ../expressions/block-expr.md#attributes-on-block-expressions diff --git a/src/glossary.md b/src/glossary.md index defa63f82..ac92b49d9 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -136,11 +136,11 @@ It allows a type to make certain promises about its behavior. Generic functions and generic structs can use traits to constrain, or bound, the types they accept. -[alignment]: type-layout.html#size-and-alignment -[enums]: items/enumerations.html -[structs]: items/structs.html -[unions]: items/unions.html -[trait objects]: types/trait-object.html -[implementations]: items/implementations.html -[traits]: items/traits.html -[object safety]: items/traits.html#object-safety +[alignment]: type-layout.md#size-and-alignment +[enums]: items/enumerations.md +[structs]: items/structs.md +[unions]: items/unions.md +[trait objects]: types/trait-object.md +[implementations]: items/implementations.md +[traits]: items/traits.md +[object safety]: items/traits.md#object-safety diff --git a/src/identifiers.md b/src/identifiers.md index 37a66787d..c0730d133 100644 --- a/src/identifiers.md +++ b/src/identifiers.md @@ -30,5 +30,5 @@ the `r#` prefix is not included as part of the actual identifier.) Unlike a normal identifier, a raw identifier may be any strict or reserved keyword except the ones listed above for `RAW_IDENTIFIER`. -[strict]: keywords.html#strict-keywords -[reserved]: keywords.html#reserved-keywords +[strict]: keywords.md#strict-keywords +[reserved]: keywords.md#reserved-keywords diff --git a/src/interior-mutability.md b/src/interior-mutability.md index 55f3caf48..bf8a18611 100644 --- a/src/interior-mutability.md +++ b/src/interior-mutability.md @@ -20,8 +20,8 @@ borrow checks to ensure the usual rules around multiple references. The accessed with atomic operations, allowing the value to be shared and mutated across threads. -[shared reference]: types/pointer.html#shared-references- -[ub]: behavior-considered-undefined.html +[shared reference]: types/pointer.md#shared-references- +[ub]: behavior-considered-undefined.md [`std::mem::transmute`]: ../std/mem/fn.transmute.html [`std::cell::UnsafeCell`]: ../std/cell/struct.UnsafeCell.html [`std::cell::RefCell`]: ../std/cell/struct.RefCell.html diff --git a/src/introduction.md b/src/introduction.md index ce1f06166..69af40b64 100644 --- a/src/introduction.md +++ b/src/introduction.md @@ -136,12 +136,12 @@ attention to making those sections the best that they can be. [the Rust Reference repository]: https://github.com/rust-lang-nursery/reference/ [big issue]: https://github.com/rust-lang-nursery/reference/issues/9 [Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/ -[_Expression_]: expressions.html +[_Expression_]: expressions.md [cargo book]: ../cargo/index.html [cargo reference]: ../cargo/reference/index.html -[expressions chapter]: expressions.html -[lifetime of temporaries]: expressions.html#temporary-lifetimes -[linkage]: linkage.html +[expressions chapter]: expressions.md +[lifetime of temporaries]: expressions.md#temporary-lifetimes +[linkage]: linkage.md [rustc book]: ../rustc/index.html -[undocumented]: undocumented.html -[Notation]: notation.html +[undocumented]: undocumented.md +[Notation]: notation.md diff --git a/src/items-and-attributes.md b/src/items-and-attributes.md index bd5018d69..830a433c3 100644 --- a/src/items-and-attributes.md +++ b/src/items-and-attributes.md @@ -3,5 +3,5 @@ Crates contain [items], each of which may have some number of [attributes] attached to it. -[items]: items.html -[attributes]: attributes.html +[items]: items.md +[attributes]: attributes.md diff --git a/src/items.md b/src/items.md index fa1fc2bdb..addbe0efd 100644 --- a/src/items.md +++ b/src/items.md @@ -63,34 +63,34 @@ qualified by the name of the enclosing item, or is private to the enclosing item (in the case of functions). The grammar specifies the exact locations in which sub-item declarations may appear. -[_ConstantItem_]: items/constant-items.html -[_Enumeration_]: items/enumerations.html -[_ExternBlock_]: items/external-blocks.html -[_ExternCrate_]: items/extern-crates.html -[_Function_]: items/functions.html -[_Implementation_]: items/implementations.html -[_MacroInvocationSemi_]: macros.html#macro-invocation -[_MacroRulesDefinition_]: macros-by-example.html -[_Module_]: items/modules.html -[_OuterAttribute_]: attributes.html -[_StaticItem_]: items/static-items.html -[_Struct_]: items/structs.html -[_Trait_]: items/traits.html -[_TypeAlias_]: items/type-aliases.html -[_Union_]: items/unions.html -[_UseDeclaration_]: items/use-declarations.html -[_Visibility_]: visibility-and-privacy.html -[`extern crate` declarations]: items/extern-crates.html -[`extern` blocks]: items/external-blocks.html -[`use` declarations]: items/use-declarations.html -[constant items]: items/constant-items.html -[enumeration definitions]: items/enumerations.html -[function definitions]: items/functions.html -[implementations]: items/implementations.html -[modules]: items/modules.html -[paths]: paths.html -[static items]: items/static-items.html -[struct definitions]: items/structs.html -[trait definitions]: items/traits.html -[type definitions]: items/type-aliases.html -[union definitions]: items/unions.html +[_ConstantItem_]: items/constant-items.md +[_Enumeration_]: items/enumerations.md +[_ExternBlock_]: items/external-blocks.md +[_ExternCrate_]: items/extern-crates.md +[_Function_]: items/functions.md +[_Implementation_]: items/implementations.md +[_MacroInvocationSemi_]: macros.md#macro-invocation +[_MacroRulesDefinition_]: macros-by-example.md +[_Module_]: items/modules.md +[_OuterAttribute_]: attributes.md +[_StaticItem_]: items/static-items.md +[_Struct_]: items/structs.md +[_Trait_]: items/traits.md +[_TypeAlias_]: items/type-aliases.md +[_Union_]: items/unions.md +[_UseDeclaration_]: items/use-declarations.md +[_Visibility_]: visibility-and-privacy.md +[`extern crate` declarations]: items/extern-crates.md +[`extern` blocks]: items/external-blocks.md +[`use` declarations]: items/use-declarations.md +[constant items]: items/constant-items.md +[enumeration definitions]: items/enumerations.md +[function definitions]: items/functions.md +[implementations]: items/implementations.md +[modules]: items/modules.md +[paths]: paths.md +[static items]: items/static-items.md +[struct definitions]: items/structs.md +[trait definitions]: items/traits.md +[type definitions]: items/type-aliases.md +[union definitions]: items/unions.md diff --git a/src/items/associated-items.md b/src/items/associated-items.md index f4f976b1d..4a113dda9 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -320,31 +320,31 @@ fn main() { } ``` -[_BlockExpression_]: ../expressions/block-expr.html -[_FunctionParam_]: ../items/functions.html -[_FunctionQualifiers_]: ../items/functions.html -[_FunctionReturnType_]: ../items/functions.html -[_Generics_]: ../items/generics.html -[_Lifetime_]: ../trait-bounds.html -[_Type_]: ../types.html#type-expressions -[_WhereClause_]: ../items/generics.html#where-clauses -[`Arc`]: ../special-types-and-traits.html#arct -[`Box`]: ../special-types-and-traits.html#boxt -[`Pin

`]: ../special-types-and-traits.html#pinp -[`Rc`]: ../special-types-and-traits.html#rct -[trait]: ../items/traits.html -[traits]: ../items/traits.html -[type aliases]: ../items/type-aliases.html -[inherent implementations]: ../items/implementations.html#inherent-implementations -[identifier]: ../identifiers.html -[identifier pattern]: ../patterns.html#identifier-patterns -[trait object]: ../types/trait-object.html -[implementations]: ../items/implementations.html -[type]: ../types.html#type-expressions -[constants]: ../items/constant-items.html -[constant item]: ../items/constant-items.html -[functions]: ../items/functions.html -[function item]: ../types/function-item.html -[method call operator]: ../expressions/method-call-expr.html -[block]: ../expressions/block-expr.html -[path]: ../paths.html +[_BlockExpression_]: ../expressions/block-expr.md +[_FunctionParam_]: ../items/functions.md +[_FunctionQualifiers_]: ../items/functions.md +[_FunctionReturnType_]: ../items/functions.md +[_Generics_]: ../items/generics.md +[_Lifetime_]: ../trait-bounds.md +[_Type_]: ../types.md#type-expressions +[_WhereClause_]: ../items/generics.md#where-clauses +[`Arc`]: ../special-types-and-traits.md#arct +[`Box`]: ../special-types-and-traits.md#boxt +[`Pin

`]: ../special-types-and-traits.md#pinp +[`Rc`]: ../special-types-and-traits.md#rct +[trait]: ../items/traits.md +[traits]: ../items/traits.md +[type aliases]: ../items/type-aliases.md +[inherent implementations]: ../items/implementations.md#inherent-implementations +[identifier]: ../identifiers.md +[identifier pattern]: ../patterns.md#identifier-patterns +[trait object]: ../types/trait-object.md +[implementations]: ../items/implementations.md +[type]: ../types.md#type-expressions +[constants]: ../items/constant-items.md +[constant item]: ../items/constant-items.md +[functions]: ../items/functions.md +[function item]: ../types/function-item.md +[method call operator]: ../expressions/method-call-expr.md +[block]: ../expressions/block-expr.md +[path]: ../paths.md diff --git a/src/items/constant-items.md b/src/items/constant-items.md index 6d8836fa7..84ef8190b 100644 --- a/src/items/constant-items.md +++ b/src/items/constant-items.md @@ -60,9 +60,9 @@ fn create_and_drop_zero_with_destructor() { } ``` -[constant value]: ../const_eval.html#constant-expressions -[static lifetime elision]: ../lifetime-elision.html#static-lifetime-elision -[`Drop`]: ../special-types-and-traits.html#drop -[IDENTIFIER]: ../identifiers.html -[_Type_]: ../types.html#type-expressions -[_Expression_]: ../expressions.html +[constant value]: ../const_eval.md#constant-expressions +[static lifetime elision]: ../lifetime-elision.md#static-lifetime-elision +[`Drop`]: ../special-types-and-traits.md#drop +[IDENTIFIER]: ../identifiers.md +[_Type_]: ../types.md#type-expressions +[_Expression_]: ../expressions.md diff --git a/src/items/enumerations.md b/src/items/enumerations.md index b9f4c681e..0aa22ce13 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -131,17 +131,17 @@ no valid values, they cannot be instantiated. enum ZeroVariants {} ``` -[IDENTIFIER]: ../identifiers.html -[_Generics_]: ../items/generics.html -[_WhereClause_]: ../items/generics.html#where-clauses -[_Expression_]: ../expressions.html -[_TupleFields_]: ../items/structs.html -[_StructFields_]: ../items/structs.html -[enumerated type]: ../types/enum.html +[IDENTIFIER]: ../identifiers.md +[_Generics_]: ../items/generics.md +[_WhereClause_]: ../items/generics.md#where-clauses +[_Expression_]: ../expressions.md +[_TupleFields_]: ../items/structs.md +[_StructFields_]: ../items/structs.md +[enumerated type]: ../types/enum.md [`mem::discriminant`]: ../../std/mem/fn.discriminant.html -[numeric cast]: ../expressions/operator-expr.html#semantics -[`repr` attribute]: ../attributes.html#ffi-attributes -[constant expression]: ../const_eval.html#constant-expressions -[default representation]: ../type-layout.html#the-default-representation -[primitive representation]: ../type-layout.html#primitive-representations -[`C` representation]: ../type-layout.html#the-c-representation +[numeric cast]: ../expressions/operator-expr.md#semantics +[`repr` attribute]: ../attributes.md#ffi-attributes +[constant expression]: ../const_eval.md#constant-expressions +[default representation]: ../type-layout.md#the-default-representation +[primitive representation]: ../type-layout.md#primitive-representations +[`C` representation]: ../type-layout.md#the-c-representation diff --git a/src/items/extern-crates.md b/src/items/extern-crates.md index eed4511ea..91a8952d4 100644 --- a/src/items/extern-crates.md +++ b/src/items/extern-crates.md @@ -96,14 +96,14 @@ will avoid being reported as unused. The [`#[macro_use]` attribute] will work as usual and import the macro names into the macro-use prelude. -[IDENTIFIER]: ../identifiers.html +[IDENTIFIER]: ../identifiers.md [RFC 940]: https://github.com/rust-lang/rfcs/blob/master/text/0940-hyphens-considered-harmful.md -[`#[macro_use]` attribute]: ../attributes.html#macro-related-attributes +[`#[macro_use]` attribute]: ../attributes.md#macro-related-attributes [`alloc`]: https://doc.rust-lang.org/alloc/ -[`crate::`]: ../paths.html#crate -[`no_implicit_prelude`]: ../items/modules.html#prelude-items -[`no_std`]: ../crates-and-source-files.html#preludes-and-no_std +[`crate::`]: ../paths.md#crate +[`no_implicit_prelude`]: ../items/modules.md#prelude-items +[`no_std`]: ../crates-and-source-files.md#preludes-and-no_std [`proc_macro`]: https://doc.rust-lang.org/proc_macro/ -[`self::`]: ../paths.html#self +[`self::`]: ../paths.md#self [`test`]: https://doc.rust-lang.org/test/ -[use declarations]: ../items/use-declarations.html +[use declarations]: ../items/use-declarations.md diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index 3188c0d34..14dbdda02 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -115,15 +115,15 @@ this to satisfy the linking requirements of extern blocks elsewhere in your code (including upstream crates) instead of adding the attribute to each extern block. -[IDENTIFIER]: ../identifiers.html -[_Abi_]: ../items/functions.html -[_FunctionParam_]: ../items/functions.html -[_FunctionParameters_]: ../items/functions.html -[_FunctionReturnType_]: ../items/functions.html -[_Generics_]: ../items/generics.html -[_InnerAttribute_]: ../attributes.html -[_OuterAttribute_]: ../attributes.html -[_Type_]: ../types.html#type-expressions -[_Visibility_]: ../visibility-and-privacy.html -[_WhereClause_]: ../items/generics.html#where-clauses -[attributes]: ../attributes.html#ffi-attributes +[IDENTIFIER]: ../identifiers.md +[_Abi_]: ../items/functions.md +[_FunctionParam_]: ../items/functions.md +[_FunctionParameters_]: ../items/functions.md +[_FunctionReturnType_]: ../items/functions.md +[_Generics_]: ../items/generics.md +[_InnerAttribute_]: ../attributes.md +[_OuterAttribute_]: ../attributes.md +[_Type_]: ../types.md#type-expressions +[_Visibility_]: ../visibility-and-privacy.md +[_WhereClause_]: ../items/generics.md#where-clauses +[attributes]: ../attributes.md#ffi-attributes diff --git a/src/items/functions.md b/src/items/functions.md index 7b33cd091..6b6cf64c8 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -212,33 +212,33 @@ attributes], [`must_use`], [the procedural macro attributes], [the testing attributes], and [the optimization hint attributes]. Functions also accept attributes macros. -[IDENTIFIER]: ../identifiers.html -[RAW_STRING_LITERAL]: ../tokens.html#raw-string-literals -[STRING_LITERAL]: ../tokens.html#string-literals -[_BlockExpression_]: ../expressions/block-expr.html -[_Generics_]: ../items/generics.html -[_InnerAttribute_]: ../attributes.html -[_Pattern_]: ../patterns.html -[_Statement_]: ../statements.html -[_Type_]: ../types.html#type-expressions -[_WhereClause_]: ../items/generics.html#where-clauses -[const context]: ../const_eval.html#const-context -[external blocks]: ../items/external-blocks.html -[path]: ../paths.html -[block]: ../expressions/block-expr.html -[variables]: ../variables.html -[type]: ../types.html#type-expressions -[*function item type*]: ../types/function-item.html -[Trait]: ../items/traits.html -[attributes]: ../attributes.html -[`cfg`]: ../conditional-compilation.html -[the lint check attributes]: ../attributes.html#lint-check-attributes -[the procedural macro attributes]: ../procedural-macros.html -[the testing attributes]: ../attributes.html#testing -[the optimization hint attributes]: ../attributes.html#optimization-hints -[`deprecated`]: ../attributes.html#deprecation -[`doc`]: ../attributes.html#documentation -[`must_use`]: ../attributes.html#must_use -[patterns]: ../patterns.html -[`?Sized`]: ../trait-bounds.html#sized -[trait bounds]: ../trait-bounds.html +[IDENTIFIER]: ../identifiers.md +[RAW_STRING_LITERAL]: ../tokens.md#raw-string-literals +[STRING_LITERAL]: ../tokens.md#string-literals +[_BlockExpression_]: ../expressions/block-expr.md +[_Generics_]: ../items/generics.md +[_InnerAttribute_]: ../attributes.md +[_Pattern_]: ../patterns.md +[_Statement_]: ../statements.md +[_Type_]: ../types.md#type-expressions +[_WhereClause_]: ../items/generics.md#where-clauses +[const context]: ../const_eval.md#const-context +[external blocks]: ../items/external-blocks.md +[path]: ../paths.md +[block]: ../expressions/block-expr.md +[variables]: ../variables.md +[type]: ../types.md#type-expressions +[*function item type*]: ../types/function-item.md +[Trait]: ../items/traits.md +[attributes]: ../attributes.md +[`cfg`]: ../conditional-compilation.md +[the lint check attributes]: ../attributes.md#lint-check-attributes +[the procedural macro attributes]: ../procedural-macros.md +[the testing attributes]: ../attributes.md#testing +[the optimization hint attributes]: ../attributes.md#optimization-hints +[`deprecated`]: ../attributes.md#deprecation +[`doc`]: ../attributes.md#documentation +[`must_use`]: ../attributes.md#must_use +[patterns]: ../patterns.md +[`?Sized`]: ../trait-bounds.md#sized +[trait bounds]: ../trait-bounds.md diff --git a/src/items/generics.md b/src/items/generics.md index b8c15e3e3..c8ec879c9 100644 --- a/src/items/generics.md +++ b/src/items/generics.md @@ -100,22 +100,22 @@ generic parameter. } ``` -[IDENTIFIER]: ../identifiers.html -[LIFETIME_OR_LABEL]: ../tokens.html#lifetimes-and-loop-labels - -[_LifetimeBounds_]: ../trait-bounds.html -[_Lifetime_]: ../trait-bounds.html -[_OuterAttribute_]: ../attributes.html -[_Type_]: ../types.html#type-expressions -[_TypeParamBounds_]: ../trait-bounds.html - -[arrays]: ../types/array.html -[function pointers]: ../types/function-pointer.html -[references]: ../types/pointer.html#shared-references- -[raw pointers]: ../types/pointer.html#raw-pointers-const-and-mut -[`Clone`]: ../special-types-and-traits.html#clone -[`Copy`]: ../special-types-and-traits.html#copy -[`Sized`]: ../special-types-and-traits.html#sized -[tuples]: ../types/tuple.html -[trait object]: ../types/trait-object.html -[attributes]: ../attributes.html +[IDENTIFIER]: ../identifiers.md +[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels + +[_LifetimeBounds_]: ../trait-bounds.md +[_Lifetime_]: ../trait-bounds.md +[_OuterAttribute_]: ../attributes.md +[_Type_]: ../types.md#type-expressions +[_TypeParamBounds_]: ../trait-bounds.md + +[arrays]: ../types/array.md +[function pointers]: ../types/function-pointer.md +[references]: ../types/pointer.md#shared-references- +[raw pointers]: ../types/pointer.md#raw-pointers-const-and-mut +[`Clone`]: ../special-types-and-traits.md#clone +[`Copy`]: ../special-types-and-traits.md#copy +[`Sized`]: ../special-types-and-traits.md#sized +[tuples]: ../types/tuple.md +[trait object]: ../types/trait-object.md +[attributes]: ../attributes.md diff --git a/src/items/implementations.md b/src/items/implementations.md index 47b0431f1..3915ae22f 100644 --- a/src/items/implementations.md +++ b/src/items/implementations.md @@ -177,23 +177,23 @@ attributes must come before any associated items. That attributes that have meaning here are [`cfg`], [`deprecated`], [`doc`], and [the lint check attributes]. -[IDENTIFIER]: ../identifiers.html -[_ConstantItem_]: ../items/constant-items.html -[_Function_]: ../items/functions.html -[_Generics_]: ../items/generics.html -[_InnerAttribute_]: ../attributes.html -[_MacroInvocationSemi_]: ../macros.html#macro-invocation -[_Method_]: ../items/associated-items.html#methods -[_OuterAttribute_]: ../attributes.html -[_TypeAlias_]: ../items/type-aliases.html -[_TypePath_]: ../paths.html#paths-in-types -[_Type_]: ../types.html#type-expressions -[_Visibility_]: ../visibility-and-privacy.html -[_WhereClause_]: ../items/generics.html#where-clauses -[trait]: ../items/traits.html -[attributes]: ../attributes.html -[`cfg`]: ../conditional-compilation.html -[`deprecated`]: ../attributes.html#deprecation -[`doc`]: ../attributes.html#documentation -[the lint check attributes]: ../attributes.html#lint-check-attributes -[Unsafe traits]: ../items/traits.html#unsafe-traits +[IDENTIFIER]: ../identifiers.md +[_ConstantItem_]: ../items/constant-items.md +[_Function_]: ../items/functions.md +[_Generics_]: ../items/generics.md +[_InnerAttribute_]: ../attributes.md +[_MacroInvocationSemi_]: ../macros.md#macro-invocation +[_Method_]: ../items/associated-items.md#methods +[_OuterAttribute_]: ../attributes.md +[_TypeAlias_]: ../items/type-aliases.md +[_TypePath_]: ../paths.md#paths-in-types +[_Type_]: ../types.md#type-expressions +[_Visibility_]: ../visibility-and-privacy.md +[_WhereClause_]: ../items/generics.md#where-clauses +[trait]: ../items/traits.md +[attributes]: ../attributes.md +[`cfg`]: ../conditional-compilation.md +[`deprecated`]: ../attributes.md#deprecation +[`doc`]: ../attributes.md#documentation +[the lint check attributes]: ../attributes.md#lint-check-attributes +[Unsafe traits]: ../items/traits.md#unsafe-traits diff --git a/src/items/modules.md b/src/items/modules.md index df4abaaf7..add7c90ac 100644 --- a/src/items/modules.md +++ b/src/items/modules.md @@ -139,15 +139,15 @@ The built-in attributes that have meaning on a function are [`cfg`], [`deprecated`], [`doc`], [the lint check attributes], `path`, and `no_implicit_prelude`. Modules also accept macro attributes. -[_InnerAttribute_]: ../attributes.html -[_Item_]: ../items.html -[_OuterAttribute_]: ../attributes.html -[`cfg`]: ../conditional-compilation.html -[`deprecated`]: ../attributes.html#deprecation -[`doc`]: ../attributes.html#documentation -[IDENTIFIER]: ../identifiers.html -[attribute]: ../attributes.html -[items]: ../items.html -[module path]: ../paths.html -[prelude]: ../crates-and-source-files.html#preludes-and-no_std -[the lint check attributes]: ../attributes.html#lint-check-attributes +[_InnerAttribute_]: ../attributes.md +[_Item_]: ../items.md +[_OuterAttribute_]: ../attributes.md +[`cfg`]: ../conditional-compilation.md +[`deprecated`]: ../attributes.md#deprecation +[`doc`]: ../attributes.md#documentation +[IDENTIFIER]: ../identifiers.md +[attribute]: ../attributes.md +[items]: ../items.md +[module path]: ../paths.md +[prelude]: ../crates-and-source-files.md#preludes-and-no_std +[the lint check attributes]: ../attributes.md#lint-check-attributes diff --git a/src/items/static-items.md b/src/items/static-items.md index 74d4c2ef9..ddc3b4b39 100644 --- a/src/items/static-items.md +++ b/src/items/static-items.md @@ -68,10 +68,10 @@ following are true: * The single-address property of statics is required. * Interior mutability is required. -[constant]: ../items/constant-items.html -[`drop`]: ../destructors.html -[constant expression]: ../const_eval.html#constant-expressions -[interior mutable]: ../interior-mutability.html -[IDENTIFIER]: ../identifiers.html -[_Type_]: ../types.html#type-expressions -[_Expression_]: ../expressions.html +[constant]: ../items/constant-items.md +[`drop`]: ../destructors.md +[constant expression]: ../const_eval.md#constant-expressions +[interior mutable]: ../interior-mutability.md +[IDENTIFIER]: ../identifiers.md +[_Type_]: ../types.md#type-expressions +[_Expression_]: ../expressions.md diff --git a/src/items/structs.md b/src/items/structs.md index 9377b9e3d..3d2275865 100644 --- a/src/items/structs.md +++ b/src/items/structs.md @@ -49,8 +49,8 @@ let px: i32 = p.x; A _tuple struct_ is a nominal [tuple type], also defined with the keyword `struct`. For example: -[struct type]: ../types/struct.html -[tuple type]: ../types/tuple.html +[struct type]: ../types/struct.md +[tuple type]: ../types/tuple.md ```rust struct Point(i32, i32); @@ -78,10 +78,10 @@ let c = [Cookie, Cookie {}, Cookie, Cookie {}]; The precise memory layout of a struct is not specified. One can specify a particular layout using the [`repr` attribute]. -[`repr` attribute]: ../type-layout.html#representations -[_OuterAttribute_]: ../attributes.html -[IDENTIFIER]: ../identifiers.html -[_Generics_]: ../items/generics.html -[_WhereClause_]: ../items/generics.html#where-clauses -[_Visibility_]: ../visibility-and-privacy.html -[_Type_]: ../types.html#type-expressions +[`repr` attribute]: ../type-layout.md#representations +[_OuterAttribute_]: ../attributes.md +[IDENTIFIER]: ../identifiers.md +[_Generics_]: ../items/generics.md +[_WhereClause_]: ../items/generics.md#where-clauses +[_Visibility_]: ../visibility-and-privacy.md +[_Type_]: ../types.md#type-expressions diff --git a/src/items/traits.md b/src/items/traits.md index c1c5ff598..b32f819f5 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -204,32 +204,32 @@ trait T { } ``` -[IDENTIFIER]: ../identifiers.html -[WildcardPattern]: ../patterns.html#wildcard-pattern -[_BlockExpression_]: ../expressions/block-expr.html -[_Expression_]: ../expressions.html -[_FunctionParam_]: ../items/functions.html -[_FunctionQualifiers_]: ../items/functions.html -[_FunctionReturnType_]: ../items/functions.html -[_Generics_]: ../items/generics.html -[_MacroInvocationSemi_]: ../macros.html#macro-invocation -[_OuterAttribute_]: ../attributes.html -[_Pattern_]: ../patterns.html -[_SelfParam_]: ../items/associated-items.html#methods -[_TypeParamBounds_]: ../trait-bounds.html -[_Type_]: ../types.html#type-expressions -[_WhereClause_]: ../items/generics.html#where-clauses -[bounds]: ../trait-bounds.html -[trait object]: ../types/trait-object.html -[explicit]: ../expressions/operator-expr.html#type-cast-expressions +[IDENTIFIER]: ../identifiers.md +[WildcardPattern]: ../patterns.md#wildcard-pattern +[_BlockExpression_]: ../expressions/block-expr.md +[_Expression_]: ../expressions.md +[_FunctionParam_]: ../items/functions.md +[_FunctionQualifiers_]: ../items/functions.md +[_FunctionReturnType_]: ../items/functions.md +[_Generics_]: ../items/generics.md +[_MacroInvocationSemi_]: ../macros.md#macro-invocation +[_OuterAttribute_]: ../attributes.md +[_Pattern_]: ../patterns.md +[_SelfParam_]: ../items/associated-items.md#methods +[_TypeParamBounds_]: ../trait-bounds.md +[_Type_]: ../types.md#type-expressions +[_WhereClause_]: ../items/generics.md#where-clauses +[bounds]: ../trait-bounds.md +[trait object]: ../types/trait-object.md +[explicit]: ../expressions/operator-expr.md#type-cast-expressions [RFC 255]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md -[associated items]: ../items/associated-items.html -[method]: ../items/associated-items.html#methods -[implementations]: ../items/implementations.html -[generics]: ../items/generics.html -[where clauses]: ../items/generics.html#where-clauses -[generic functions]: ../items/functions.html#generic-functions -[unsafe]: ../unsafety.html -[trait implementation]: ../items/implementations.html#trait-implementations -[`Send`]: ../special-types-and-traits.html#send -[`Sync`]: ../special-types-and-traits.html#sync +[associated items]: ../items/associated-items.md +[method]: ../items/associated-items.md#methods +[implementations]: ../items/implementations.md +[generics]: ../items/generics.md +[where clauses]: ../items/generics.md#where-clauses +[generic functions]: ../items/functions.md#generic-functions +[unsafe]: ../unsafety.md +[trait implementation]: ../items/implementations.md#trait-implementations +[`Send`]: ../special-types-and-traits.md#send +[`Sync`]: ../special-types-and-traits.md#sync diff --git a/src/items/type-aliases.md b/src/items/type-aliases.md index 73278fc7b..81d55e9bc 100644 --- a/src/items/type-aliases.md +++ b/src/items/type-aliases.md @@ -27,7 +27,7 @@ let _: F = E::A; // OK // let _: F = F::A; // Doesn't work ``` -[IDENTIFIER]: ../identifiers.html -[_Generics_]: ../items/generics.html -[_WhereClause_]: ../items/generics.html#where-clauses -[_Type_]: ../types.html#type-expressions +[IDENTIFIER]: ../identifiers.md +[_Generics_]: ../items/generics.md +[_WhereClause_]: ../items/generics.md#where-clauses +[_Type_]: ../types.md#type-expressions diff --git a/src/items/unions.md b/src/items/unions.md index 4cab4f317..78abbb171 100644 --- a/src/items/unions.md +++ b/src/items/unions.md @@ -148,8 +148,8 @@ aspects of Rust language (such as privacy, name resolution, type inference, generics, trait implementations, inherent implementations, coherence, pattern checking, etc etc etc). -[IDENTIFIER]: ../identifiers.html -[_Generics_]: ../items/generics.html -[_WhereClause_]: ../items/generics.html#where-clauses -[_StructFields_]: ../items/structs.html +[IDENTIFIER]: ../identifiers.md +[_Generics_]: ../items/generics.md +[_WhereClause_]: ../items/generics.md#where-clauses +[_StructFields_]: ../items/structs.md [`transmute`]: ../../std/mem/fn.transmute.html diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index ff4894e4f..443ffc7b0 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -14,13 +14,13 @@ some other [path]. Usually a `use` declaration is used to shorten the path required to refer to a module item. These declarations may appear in [modules] and [blocks], usually at the top. -[path]: ../paths.html -[modules]: ../items/modules.html -[blocks]: ../expressions/block-expr.html +[path]: ../paths.md +[modules]: ../items/modules.md +[blocks]: ../expressions/block-expr.md > **Note**: Unlike in many languages, `use` declarations in Rust do *not* > declare linkage dependency with external crates. Rather, [`extern crate` -> declarations](../items/extern-crates.html) declare linkage dependencies. +> declarations](../items/extern-crates.md) declare linkage dependencies. Use declarations support a number of convenient shortcuts: @@ -199,8 +199,8 @@ m!(use std as _;); // use std as _; ``` -[IDENTIFIER]: ../identifiers.html -[_SimplePath_]: ../paths.html#simple-paths -[`extern crate`]: ../items/extern-crates.html -[extern prelude]: ../items/extern-crates.html#extern-prelude -[path qualifiers]: ../paths.html#path-qualifiers +[IDENTIFIER]: ../identifiers.md +[_SimplePath_]: ../paths.md#simple-paths +[`extern crate`]: ../items/extern-crates.md +[extern prelude]: ../items/extern-crates.md#extern-prelude +[path qualifiers]: ../paths.md#path-qualifiers diff --git a/src/keywords.md b/src/keywords.md index a0dc33dfa..4eac07055 100644 --- a/src/keywords.md +++ b/src/keywords.md @@ -116,14 +116,14 @@ is possible to declare a variable or method with the name `union`. > **Lexer 2015**\ > KW_DYN : `dyn` -[items]: items.html -[Variables]: variables.html -[Type parameters]: types/parameters.html -[loop labels]: expressions/loop-expr.html#loop-labels -[Macros]: macros.html -[attributes]: attributes.html -[Macro placeholders]: macros-by-example.html -[Crates]: crates-and-source-files.html -[union]: items/unions.html -[variants]: items/enumerations.html -[`dyn`]: types/trait-object.html +[items]: items.md +[Variables]: variables.md +[Type parameters]: types/parameters.md +[loop labels]: expressions/loop-expr.md#loop-labels +[Macros]: macros.md +[attributes]: attributes.md +[Macro placeholders]: macros-by-example.md +[Crates]: crates-and-source-files.md +[union]: items/unions.md +[variants]: items/enumerations.md +[`dyn`]: types/trait-object.md diff --git a/src/lifetime-elision.md b/src/lifetime-elision.md index e2414d13c..e12f40307 100644 --- a/src/lifetime-elision.md +++ b/src/lifetime-elision.md @@ -169,13 +169,13 @@ const RESOLVED_MULTIPLE: &dyn Fn(&Foo, &Bar, &Baz) -> usize = .. const RESOLVED_STATIC: &dyn Fn(&Foo, &Bar) -> &Baz = .. ``` -[closure trait]: types/closure.html -[constant]: items/constant-items.html -[function item]: types/function-item.html -[function pointer]: types/function-pointer.html -[implementation]: items/implementations.html +[closure trait]: types/closure.md +[constant]: items/constant-items.md +[function item]: types/function-item.md +[function pointer]: types/function-pointer.md +[implementation]: items/implementations.md [RFC 599]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md [RFC 1156]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md -[static]: items/static-items.html -[trait object]: types/trait-object.html -[type aliases]: items/type-aliases.html +[static]: items/static-items.md +[trait object]: types/trait-object.md +[type aliases]: items/type-aliases.md diff --git a/src/linkage.md b/src/linkage.md index 691e46584..eecd8e839 100644 --- a/src/linkage.md +++ b/src/linkage.md @@ -210,5 +210,5 @@ a statically linked binary on MSVC you would execute: RUSTFLAGS='-C target-feature=+crt-static' cargo build --target x86_64-pc-windows-msvc ``` -[configuration option]: conditional-compilation.html -[procedural macros]: procedural-macros.html \ No newline at end of file +[configuration option]: conditional-compilation.md +[procedural macros]: procedural-macros.md diff --git a/src/macros-by-example.md b/src/macros-by-example.md index c62e357c0..0b796e07d 100644 --- a/src/macros-by-example.md +++ b/src/macros-by-example.md @@ -73,21 +73,21 @@ syntax named by _designator_. Valid designators are: * `vis`: a [_Visibility_] qualifier * `literal`: matches `-`?[_LiteralExpression_] -[IDENTIFIER]: identifiers.html -[IDENTIFIER_OR_KEYWORD]: identifiers.html -[LIFETIME_TOKEN]: tokens.html#lifetimes-and-loop-labels -[_BlockExpression_]: expressions/block-expr.html -[_Expression_]: expressions.html -[_Item_]: items.html -[_LiteralExpression_]: expressions/literal-expr.html -[_MetaItem_]: attributes.html -[_Pattern_]: patterns.html -[_Statement_]: statements.html -[_TokenTree_]: macros.html#macro-invocation -[_TypePath_]: paths.html#paths-in-types -[_Type_]: types.html#type-expressions -[_Visibility_]: visibility-and-privacy.html -[token]: tokens.html +[IDENTIFIER]: identifiers.md +[IDENTIFIER_OR_KEYWORD]: identifiers.md +[LIFETIME_TOKEN]: tokens.md#lifetimes-and-loop-labels +[_BlockExpression_]: expressions/block-expr.md +[_Expression_]: expressions.md +[_Item_]: items.md +[_LiteralExpression_]: expressions/literal-expr.md +[_MetaItem_]: attributes.md +[_Pattern_]: patterns.md +[_Statement_]: statements.md +[_TokenTree_]: macros.md#macro-invocation +[_TypePath_]: paths.md#paths-in-types +[_Type_]: types.md#type-expressions +[_Visibility_]: visibility-and-privacy.md +[token]: tokens.md In the transcriber, the designator is already known, and so only the name of a matched nonterminal comes @@ -168,5 +168,5 @@ Rust syntax is restricted in two ways: ``` [RFC 550]: https://github.com/rust-lang/rfcs/blob/master/text/0550-macro-future-proofing.md -[_DelimTokenTree_]: macros.html -[_Token_]: tokens.html +[_DelimTokenTree_]: macros.md +[_Token_]: tokens.md diff --git a/src/macros.md b/src/macros.md index 55da4eb33..58d4395b4 100644 --- a/src/macros.md +++ b/src/macros.md @@ -86,18 +86,18 @@ macro_rules! example { example!(); ``` -[Macros by Example]: macros-by-example.html -[Procedural Macros]: procedural-macros.html -[_SimplePath_]: paths.html#simple-paths -[_Token_]: tokens.html -[associated items]: items/associated-items.html +[Macros by Example]: macros-by-example.md +[Procedural Macros]: procedural-macros.md +[_SimplePath_]: paths.md#simple-paths +[_Token_]: tokens.md +[associated items]: items/associated-items.md [compiler plugins]: ../unstable-book/language-features/plugin.html -[delimiters]: tokens.html#delimiters -[expressions]: expressions.html -[items]: items.html -[`macro_rules`]: macros-by-example.html -[patterns]: patterns.html -[statements]: statements.html -[tokens]: tokens.html -[types]: types.html -[visibility qualifiers]: visibility-and-privacy.html +[delimiters]: tokens.md#delimiters +[expressions]: expressions.md +[items]: items.md +[`macro_rules`]: macros-by-example.md +[patterns]: patterns.md +[statements]: statements.md +[tokens]: tokens.md +[types]: types.md +[visibility qualifiers]: visibility-and-privacy.md diff --git a/src/notation.md b/src/notation.md index 4dfff85d8..2f9b42f01 100644 --- a/src/notation.md +++ b/src/notation.md @@ -35,7 +35,7 @@ When such a string in `monospace` font occurs inside the grammar, it is an implicit reference to a single member of such a string table production. See [tokens] for more information. -[binary operators]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators -[keywords]: keywords.html -[tokens]: tokens.html -[unary operators]: expressions/operator-expr.html#borrow-operators +[binary operators]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators +[keywords]: keywords.md +[tokens]: tokens.md +[unary operators]: expressions/operator-expr.md#borrow-operators diff --git a/src/paths.md b/src/paths.md index f363b6399..34d9ddc8e 100644 --- a/src/paths.md +++ b/src/paths.md @@ -353,25 +353,25 @@ mod without { // ::without ``` [_GenericArgs_]: #paths-in-expressions -[_Lifetime_]: trait-bounds.html -[_Type_]: types.html#type-expressions -[item]: items.html -[variable]: variables.html -[identifiers]: identifiers.html -[implementations]: items/implementations.html -[modules]: items/modules.html -[use declarations]: items/use-declarations.html -[IDENTIFIER]: identifiers.html -[`use`]: items/use-declarations.html -[attributes]: attributes.html -[enum]: items/enumerations.html -[expressions]: expressions.html -[macro transcribers]: macros-by-example.html -[macros]: macros-by-example.html -[patterns]: patterns.html -[struct]: items/structs.html -[trait implementation]: items/implementations.html#trait-implementations -[trait implementations]: items/implementations.html#trait-implementations -[traits]: items/traits.html -[union]: items/unions.html -[visibility]: visibility-and-privacy.html +[_Lifetime_]: trait-bounds.md +[_Type_]: types.md#type-expressions +[item]: items.md +[variable]: variables.md +[identifiers]: identifiers.md +[implementations]: items/implementations.md +[modules]: items/modules.md +[use declarations]: items/use-declarations.md +[IDENTIFIER]: identifiers.md +[`use`]: items/use-declarations.md +[attributes]: attributes.md +[enum]: items/enumerations.md +[expressions]: expressions.md +[macro transcribers]: macros-by-example.md +[macros]: macros-by-example.md +[patterns]: patterns.md +[struct]: items/structs.md +[trait implementation]: items/implementations.md#trait-implementations +[trait implementations]: items/implementations.md#trait-implementations +[traits]: items/traits.md +[union]: items/unions.md +[visibility]: visibility-and-privacy.md diff --git a/src/patterns.md b/src/patterns.md index 87f1ac936..8947467b0 100644 --- a/src/patterns.md +++ b/src/patterns.md @@ -57,13 +57,13 @@ if let Patterns are used in: -* [`let` declarations](statements.html#let-statements) -* [Function](items/functions.html) and [closure](expressions/closure-expr.html) +* [`let` declarations](statements.md#let-statements) +* [Function](items/functions.md) and [closure](expressions/closure-expr.md) parameters -* [`match` expressions](expressions/match-expr.html) -* [`if let` expressions](expressions/if-expr.html) -* [`while let` expressions](expressions/loop-expr.html#predicate-pattern-loops) -* [`for` expressions](expressions/loop-expr.html#iterator-loops) +* [`match` expressions](expressions/match-expr.md) +* [`if let` expressions](expressions/if-expr.md) +* [`while let` expressions](expressions/loop-expr.md#predicate-pattern-loops) +* [`for` expressions](expressions/loop-expr.md#iterator-loops) ## Destructuring @@ -125,15 +125,15 @@ if let (a, 3) = (1, 2) { // "(a, 3)" is refutable, and will not match >    | `-`? [INTEGER_LITERAL]\ >    | `-`? [FLOAT_LITERAL] -[BOOLEAN_LITERAL]: tokens.html#boolean-literals -[CHAR_LITERAL]: tokens.html#character-literals -[BYTE_LITERAL]: tokens.html#byte-literals -[STRING_LITERAL]: tokens.html#string-literals -[RAW_STRING_LITERAL]: tokens.html#raw-string-literals -[BYTE_STRING_LITERAL]: tokens.html#byte-string-literals -[RAW_BYTE_STRING_LITERAL]: tokens.html#raw-byte-string-literals -[INTEGER_LITERAL]: tokens.html#integer-literals -[FLOAT_LITERAL]: tokens.html#floating-point-literals +[BOOLEAN_LITERAL]: tokens.md#boolean-literals +[CHAR_LITERAL]: tokens.md#character-literals +[BYTE_LITERAL]: tokens.md#byte-literals +[STRING_LITERAL]: tokens.md#string-literals +[RAW_STRING_LITERAL]: tokens.md#raw-string-literals +[BYTE_STRING_LITERAL]: tokens.md#byte-string-literals +[RAW_BYTE_STRING_LITERAL]: tokens.md#raw-byte-string-literals +[INTEGER_LITERAL]: tokens.md#integer-literals +[FLOAT_LITERAL]: tokens.md#floating-point-literals _Literal patterns_ match exactly the same value as what is created by the literal. Since negative numbers are not [literals], literal patterns also @@ -480,8 +480,8 @@ Reference patterns are always irrefutable. >    [_OuterAttribute_] \*\ >    `..` -[_OuterAttribute_]: attributes.html -[TUPLE_INDEX]: tokens.html#integer-literals +[_OuterAttribute_]: attributes.md +[TUPLE_INDEX]: tokens.md#integer-literals Struct patterns match struct values that match all criteria defined by its subpatterns. They are also used to [destructure](#destructuring) a struct. @@ -657,11 +657,11 @@ refer to refutable constants or enum variants for enums with multiple variants. [_GroupedPattern_]: #grouped-patterns [_IdentifierPattern_]: #identifier-patterns [_LiteralPattern_]: #literal-patterns -[_MacroInvocation_]: macros.html#macro-invocation -[_PathInExpression_]: paths.html#paths-in-expressions +[_MacroInvocation_]: macros.md#macro-invocation +[_PathInExpression_]: paths.md#paths-in-expressions [_PathPattern_]: #path-patterns [_Pattern_]: #patterns -[_QualifiedPathInExpression_]: paths.html#qualified-paths +[_QualifiedPathInExpression_]: paths.md#qualified-paths [_RangePattern_]: #range-patterns [_ReferencePattern_]: #reference-patterns [_SlicePattern_]: #slice-patterns @@ -670,10 +670,10 @@ refer to refutable constants or enum variants for enums with multiple variants. [_TupleStructPattern_]: #tuple-struct-patterns [_WildcardPattern_]: #wildcard-pattern -[`Copy`]: special-types-and-traits.html#copy -[IDENTIFIER]: identifiers.html -[enums]: items/enumerations.html -[literals]: expressions/literal-expr.html -[structs]: items/structs.html -[tuples]: types/tuple.html -[scrutinee]: glossary.html#scrutinee +[`Copy`]: special-types-and-traits.md#copy +[IDENTIFIER]: identifiers.md +[enums]: items/enumerations.md +[literals]: expressions/literal-expr.md +[structs]: items/structs.md +[tuples]: types/tuple.md +[scrutinee]: glossary.md#scrutinee diff --git a/src/procedural-macros.md b/src/procedural-macros.md index 76f51f59f..766eda20f 100644 --- a/src/procedural-macros.md +++ b/src/procedural-macros.md @@ -269,28 +269,28 @@ fn invoke4() {} [`TokenStream`]: ../proc_macro/struct.TokenStream.html [`TokenStream`s]: ../proc_macro/struct.TokenStream.html [`compile_error`]: ../std/macro.compile_error.html -[`derive`]: attributes.html#derive +[`derive`]: attributes.md#derive [`proc_macro` crate]: ../proc_macro/index.html [Cargo's build scripts]: ../cargo/reference/build-scripts.html [Derive mode macros]: #derive-mode-macros [Attribute macros]: #attribute-macros [Function-like macros]: #function-like-procedural-macros -[attribute]: attributes.html -[attributes]: attributes.html -[block]: expressions/block-expr.html -[custom attributes]: attributes.html -[crate type]: linkage.html +[attribute]: attributes.md +[attributes]: attributes.md +[block]: expressions/block-expr.md +[custom attributes]: attributes.md +[crate type]: linkage.md [derive mode helper attributes]: #derive-mode-helper-attributes -[enum]: items/enumerations.html -[inert]: attributes.html#active-and-inert-attributes -[item]: items.html -[item declaration statements]: statements.html#item-declarations -[items]: items.html -[function]: items/functions.html -[macro]: macros.html -[module]: items/modules.html -[modules]: items/modules.html +[enum]: items/enumerations.md +[inert]: attributes.md#active-and-inert-attributes +[item]: items.md +[item declaration statements]: statements.md#item-declarations +[items]: items.md +[function]: items/functions.md +[macro]: macros.md +[module]: items/modules.md +[modules]: items/modules.md [procedural macro tutorial]: ../book/2018-edition/appendix-04-macros.html#procedural-macros-for-custom-derive -[public]: visibility-and-privacy.html -[struct]: items/structs.html -[union]: items/unions.html +[public]: visibility-and-privacy.md +[struct]: items/structs.md +[union]: items/unions.md diff --git a/src/special-types-and-traits.md b/src/special-types-and-traits.md index 6d803a0aa..1a573897c 100644 --- a/src/special-types-and-traits.md +++ b/src/special-types-and-traits.md @@ -154,29 +154,29 @@ compiler, not by [implementation items]. [`UnwindSafe`]: ../std/panic/trait.UnwindSafe.html [`Sync`]: ../std/marker/trait.Sync.html -[Arrays]: types/array.html -[call expressions]: expressions/call-expr.html -[deref coercions]: type-coercions.html#coercion-types -[dereference operator]: expressions/operator-expr.html#the-dereference-operator -[destructor]: destructors.html +[Arrays]: types/array.md +[call expressions]: expressions/call-expr.md +[deref coercions]: type-coercions.md#coercion-types +[dereference operator]: expressions/operator-expr.md#the-dereference-operator +[destructor]: destructors.md [drop check]: ../nomicon/dropck.html -[dynamically sized type]: dynamically-sized-types.html -[Function pointers]: types/function-pointer.html -[function item types]: types/function-item.html -[implementation items]: items/implementations.html -[indexing expressions]: expressions/array-expr.html#array-and-slice-indexing-expressions -[interior mutability]: interior-mutability.html -[Numeric types]: types/numeric.html -[Methods]: items/associated-items.html#associated-functions-and-methods -[method resolution]: expressions/method-call-expr.html -[operators]: expressions/operator-expr.html -[orphan rules]: items/implementations.html#trait-implementation-coherence -[Raw pointers]: types/pointer.html#raw-pointers-const-and-mut -[`static` items]: items/static-items.html -[Shared references]: types/pointer.html#shared-references- +[dynamically sized type]: dynamically-sized-types.md +[Function pointers]: types/function-pointer.md +[function item types]: types/function-item.md +[implementation items]: items/implementations.md +[indexing expressions]: expressions/array-expr.md#array-and-slice-indexing-expressions +[interior mutability]: interior-mutability.md +[Numeric types]: types/numeric.md +[Methods]: items/associated-items.md#associated-functions-and-methods +[method resolution]: expressions/method-call-expr.md +[operators]: expressions/operator-expr.md +[orphan rules]: items/implementations.md#trait-implementation-coherence +[Raw pointers]: types/pointer.md#raw-pointers-const-and-mut +[`static` items]: items/static-items.md +[Shared references]: types/pointer.md#shared-references- [the standard library]: ../std/index.html -[trait object]: types/trait-object.html -[Tuples]: types/tuple.html -[Type parameters]: types/parameters.html -[variance]: subtyping.html#variance -[`!`]: types/never.html +[trait object]: types/trait-object.md +[Tuples]: types/tuple.md +[Type parameters]: types/parameters.md +[variance]: subtyping.md#variance +[`!`]: types/never.md diff --git a/src/statements.md b/src/statements.md index ab89cbd73..9a4ea8a99 100644 --- a/src/statements.md +++ b/src/statements.md @@ -115,23 +115,23 @@ if true { Statements accept [outer attributes]. The attributes that have meaning on a statement are [`cfg`], and [the lint check attributes]. -[block]: expressions/block-expr.html -[expression]: expressions.html -[function]: items/functions.html -[item]: items.html -[module]: items/modules.html -[canonical path]: paths.html#canonical-paths -[implementations]: items/implementations.html -[variables]: variables.html -[outer attributes]: attributes.html -[`cfg`]: conditional-compilation.html -[the lint check attributes]: attributes.html#lint-check-attributes -[pattern]: patterns.html +[block]: expressions/block-expr.md +[expression]: expressions.md +[function]: items/functions.md +[item]: items.md +[module]: items/modules.md +[canonical path]: paths.md#canonical-paths +[implementations]: items/implementations.md +[variables]: variables.md +[outer attributes]: attributes.md +[`cfg`]: conditional-compilation.md +[the lint check attributes]: attributes.md#lint-check-attributes +[pattern]: patterns.md [_ExpressionStatement_]: #expression-statements -[_Expression_]: expressions.html -[_Item_]: items.html +[_Expression_]: expressions.md +[_Item_]: items.md [_LetStatement_]: #let-statements -[_MacroInvocationSemi_]: macros.html#macro-invocation -[_OuterAttribute_]: attributes.html -[_Pattern_]: patterns.html -[_Type_]: types.html +[_MacroInvocationSemi_]: macros.md#macro-invocation +[_OuterAttribute_]: attributes.md +[_Pattern_]: patterns.md +[_Type_]: types.md diff --git a/src/subtyping.md b/src/subtyping.md index 6a9c5e26a..5b1be058a 100644 --- a/src/subtyping.md +++ b/src/subtyping.md @@ -82,8 +82,8 @@ struct Variance<'a, 'b, T, U: 'a> { } ``` -[coercions]: type-coercions.html -[function pointers]: types/function-pointer.html +[coercions]: type-coercions.md +[function pointers]: types/function-pointer.md [Higher-ranked]: ../nomicon/hrtb.html -[lifetime bound]: types/trait-object.html#trait-object-lifetime-bounds -[trait objects]: types/trait-object.html +[lifetime bound]: types/trait-object.md#trait-object-lifetime-bounds +[trait objects]: types/trait-object.md diff --git a/src/tokens.md b/src/tokens.md index 2f772dfcf..f9566440e 100644 --- a/src/tokens.md +++ b/src/tokens.md @@ -14,14 +14,14 @@ into the following kinds of tokens: Within this documentation's grammar, "simple" tokens are given in [string table production] form, and appear in `monospace` font. -[string table production]: notation.html#string-table-productions +[string table production]: notation.md#string-table-productions ## Literals A literal is an expression consisting of a single token, rather than a sequence of tokens, that immediately and directly denotes the value it evaluates to, rather than referring to it by name or some other evaluation rule. A literal is -a form of [constant expression](const_eval.html#constant-expressions), so is +a form of [constant expression](const_eval.md#constant-expressions), so is evaluated (primarily) at compile time. ### Examples @@ -422,7 +422,7 @@ Note that the Rust syntax considers `-1i8` as an application of the [unary minus operator] to an integer literal `1i8`, rather than a single integer literal. -[unary minus operator]: expressions/operator-expr.html#negation-operators +[unary minus operator]: expressions/operator-expr.md#negation-operators #### Floating-point literals @@ -483,7 +483,7 @@ to call a method named `f64` on `2`. The representation semantics of floating-point numbers are described in ["Machine Types"]. -["Machine Types"]: types/numeric.html +["Machine Types"]: types/numeric.md ### Boolean literals @@ -508,7 +508,7 @@ Lifetime parameters and [loop labels] use LIFETIME_OR_LABEL tokens. Any LIFETIME_TOKEN will be accepted by the lexer, and for example, can be used in macros. -[loop labels]: expressions/loop-expr.html +[loop labels]: expressions/loop-expr.md ## Punctuation @@ -576,44 +576,44 @@ them are referred to as "token trees" in [macros]. The three types of brackets | `(` `)` | Parentheses | -[Inferred types]: types/inferred.html -[Operator expressions]: expressions/operator-expr.html -[Range patterns]: patterns.html#range-patterns -[Reference patterns]: patterns.html#reference-patterns -[Subpattern binding]: patterns.html#identifier-patterns -[Wildcard patterns]: patterns.html#wildcard-pattern -[arith]: expressions/operator-expr.html#arithmetic-and-logical-binary-operators -[array types]: types/array.html -[assignment]: expressions/operator-expr.html#assignment-expressions -[attributes]: attributes.html -[borrow]: expressions/operator-expr.html#borrow-operators -[closures]: expressions/closure-expr.html -[comparison]: expressions/operator-expr.html#comparison-operators -[compound]: expressions/operator-expr.html#compound-assignment-expressions -[constant items]: items/constant-items.html -[dereference]: expressions/operator-expr.html#the-dereference-operator -[extern]: items/external-blocks.html -[field]: expressions/field-expr.html -[functions]: items/functions.html -[generics]: items/generics.html -[identifier]: identifiers.html -[keywords]: keywords.html -[lazy-bool]: expressions/operator-expr.html#lazy-boolean-operators -[macros]: macros-by-example.html -[match]: expressions/match-expr.html -[negation]: expressions/operator-expr.html#negation-operators -[never type]: types/never.html -[paths]: paths.html -[patterns]: patterns.html -[question]: expressions/operator-expr.html#the-question-mark-operator -[range]: expressions/range-expr.html -[raw pointers]: types/pointer.html#raw-pointers-const-and-mut -[references]: types/pointer.html -[sized]: trait-bounds.html#sized -[struct expressions]: expressions/struct-expr.html +[Inferred types]: types/inferred.md +[Operator expressions]: expressions/operator-expr.md +[Range patterns]: patterns.md#range-patterns +[Reference patterns]: patterns.md#reference-patterns +[Subpattern binding]: patterns.md#identifier-patterns +[Wildcard patterns]: patterns.md#wildcard-pattern +[arith]: expressions/operator-expr.md#arithmetic-and-logical-binary-operators +[array types]: types/array.md +[assignment]: expressions/operator-expr.md#assignment-expressions +[attributes]: attributes.md +[borrow]: expressions/operator-expr.md#borrow-operators +[closures]: expressions/closure-expr.md +[comparison]: expressions/operator-expr.md#comparison-operators +[compound]: expressions/operator-expr.md#compound-assignment-expressions +[constant items]: items/constant-items.md +[dereference]: expressions/operator-expr.md#the-dereference-operator +[extern]: items/external-blocks.md +[field]: expressions/field-expr.md +[functions]: items/functions.md +[generics]: items/generics.md +[identifier]: identifiers.md +[keywords]: keywords.md +[lazy-bool]: expressions/operator-expr.md#lazy-boolean-operators +[macros]: macros-by-example.md +[match]: expressions/match-expr.md +[negation]: expressions/operator-expr.md#negation-operators +[never type]: types/never.md +[paths]: paths.md +[patterns]: patterns.md +[question]: expressions/operator-expr.md#the-question-mark-operator +[range]: expressions/range-expr.md +[raw pointers]: types/pointer.md#raw-pointers-const-and-mut +[references]: types/pointer.md +[sized]: trait-bounds.md#sized +[struct expressions]: expressions/struct-expr.md [tokens]: #tokens -[trait bounds]: trait-bounds.html -[tuple index]: expressions/tuple-expr.html#tuple-indexing-expressions -[tuple structs]: items/structs.html -[tuple variants]: items/enumerations.html -[tuples]: types/tuple.html +[trait bounds]: trait-bounds.md +[tuple index]: expressions/tuple-expr.md#tuple-indexing-expressions +[tuple structs]: items/structs.md +[tuple variants]: items/enumerations.md +[tuples]: types/tuple.md diff --git a/src/trait-bounds.md b/src/trait-bounds.md index cbdaf958a..6c48e5e6f 100644 --- a/src/trait-bounds.md +++ b/src/trait-bounds.md @@ -134,13 +134,13 @@ fn call_on_ref_zero(f: F) where F: for<'a> Fn(&'a i32) { } ``` -[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels -[_TypePath_]: paths.html#paths-in-types -[`Sized`]: special-types-and-traits.html#sized - -[associated types]: items/associated-items.html#associated-types -[supertraits]: items/traits.html#supertraits -[generic]: items/generics.html -[Trait]: items/traits.html#trait-bounds -[trait objects]: types/trait-object.html -[where clause]: items/generics.html#where-clauses +[LIFETIME_OR_LABEL]: tokens.md#lifetimes-and-loop-labels +[_TypePath_]: paths.md#paths-in-types +[`Sized`]: special-types-and-traits.md#sized + +[associated types]: items/associated-items.md#associated-types +[supertraits]: items/traits.md#supertraits +[generic]: items/generics.md +[Trait]: items/traits.md#trait-bounds +[trait objects]: types/trait-object.md +[where clause]: items/generics.md#where-clauses diff --git a/src/type-layout.md b/src/type-layout.md index c746855fa..f2c3c3dcd 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -327,9 +327,9 @@ used with any other representation. [`align_of`]: ../std/mem/fn.align_of.html [`size_of`]: ../std/mem/fn.size_of.html [`Sized`]: ../std/marker/trait.Sized.html -[dynamically sized types]: dynamically-sized-types.html -[C-like enumerations]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations -[zero-variant enumerations]: items/enumerations.html#zero-variant-enums -[undefined behavior]: behavior-considered-undefined.html +[dynamically sized types]: dynamically-sized-types.md +[C-like enumerations]: items/enumerations.md#custom-discriminant-values-for-field-less-enumerations +[zero-variant enumerations]: items/enumerations.md#zero-variant-enums +[undefined behavior]: behavior-considered-undefined.md [27060]: https://github.com/rust-lang/rust/issues/27060 -[`PhantomData`]: special-types-and-traits.html#phantomdatat \ No newline at end of file +[`PhantomData`]: special-types-and-traits.md#phantomdatat diff --git a/src/types.md b/src/types.md index 3e44d0159..e105dab0f 100644 --- a/src/types.md +++ b/src/types.md @@ -119,60 +119,60 @@ enum List { let a: List = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil)))); ``` -[_ArrayType_]: types/array.html -[_BareFunctionType_]: types/function-pointer.html -[_ImplTraitTypeOneBound_]: types/impl-trait.html -[_ImplTraitType_]: types/impl-trait.html -[_InferredType_]: types/inferred.html -[_MacroInvocation_]: macros.html#macro-invocation -[_NeverType_]: types/never.html -[_ParenthesizedType_]: types.html#parenthesized-types -[_QualifiedPathInType_]: paths.html#qualified-paths -[_RawPointerType_]: types/pointer.html#raw-pointers-const-and-mut -[_ReferenceType_]: types/pointer.html#shared-references- -[_SliceType_]: types/slice.html -[_TraitObjectTypeOneBound_]: types/trait-object.html -[_TraitObjectType_]: types/trait-object.html -[_TupleType_]: types/tuple.html#tuple-types -[_TypeNoBounds_]: types.html#type-expressions -[_TypePath_]: paths.html#paths-in-types -[_Type_]: types.html#type-expressions - -[Array]: types/array.html -[Boolean]: types/boolean.html -[Closures]: types/closure.html -[Enum]: types/enum.html -[Function pointers]: types/function-pointer.html -[Functions]: types/function-item.html -[Impl trait]: types/impl-trait.html -[Macros]: macros.html -[Numeric]: types/numeric.html +[_ArrayType_]: types/array.md +[_BareFunctionType_]: types/function-pointer.md +[_ImplTraitTypeOneBound_]: types/impl-trait.md +[_ImplTraitType_]: types/impl-trait.md +[_InferredType_]: types/inferred.md +[_MacroInvocation_]: macros.md#macro-invocation +[_NeverType_]: types/never.md +[_ParenthesizedType_]: types.md#parenthesized-types +[_QualifiedPathInType_]: paths.md#qualified-paths +[_RawPointerType_]: types/pointer.md#raw-pointers-const-and-mut +[_ReferenceType_]: types/pointer.md#shared-references- +[_SliceType_]: types/slice.md +[_TraitObjectTypeOneBound_]: types/trait-object.md +[_TraitObjectType_]: types/trait-object.md +[_TupleType_]: types/tuple.md#tuple-types +[_TypeNoBounds_]: types.md#type-expressions +[_TypePath_]: paths.md#paths-in-types +[_Type_]: types.md#type-expressions + +[Array]: types/array.md +[Boolean]: types/boolean.md +[Closures]: types/closure.md +[Enum]: types/enum.md +[Function pointers]: types/function-pointer.md +[Functions]: types/function-item.md +[Impl trait]: types/impl-trait.md +[Macros]: macros.md +[Numeric]: types/numeric.md [Parentheses]: #parenthesized-types -[Raw pointers]: types/pointer.html#raw-pointers-const-and-mut -[References]: types/pointer.html#shared-references- -[Slice]: types/slice.html -[Struct]: types/struct.html -[Textual]: types/textual.html -[Trait objects]: types/trait-object.html -[Tuple]: types/tuple.html -[Type paths]: paths.html#paths-in-types -[Union]: types/union.html -[`Self` path]: paths.html#self-1 -[arrays]: types/array.html -[enumerations]: types/enum.html -[function pointer]: types/function-pointer.html -[inferred type]: types/inferred.html -[item]: items.html -[never]: types/never.html -[pointer types]: types/pointer.html -[raw pointer]: types/pointer.html#raw-pointers-const-and-mut -[reference type]: types/pointer.html#shared-references- -[reference]: types/pointer.html#shared-references- -[structs]: types/struct.html -[trait]: types/trait-object.html -[tuples]: types/tuple.html -[type alias]: items/type-aliases.html -[type aliases]: items/type-aliases.html -[type boundaries]: trait-bounds.html -[type parameters]: types/parameters.html -[unions]: types/union.html +[Raw pointers]: types/pointer.md#raw-pointers-const-and-mut +[References]: types/pointer.md#shared-references- +[Slice]: types/slice.md +[Struct]: types/struct.md +[Textual]: types/textual.md +[Trait objects]: types/trait-object.md +[Tuple]: types/tuple.md +[Type paths]: paths.md#paths-in-types +[Union]: types/union.md +[`Self` path]: paths.md#self-1 +[arrays]: types/array.md +[enumerations]: types/enum.md +[function pointer]: types/function-pointer.md +[inferred type]: types/inferred.md +[item]: items.md +[never]: types/never.md +[pointer types]: types/pointer.md +[raw pointer]: types/pointer.md#raw-pointers-const-and-mut +[reference type]: types/pointer.md#shared-references- +[reference]: types/pointer.md#shared-references- +[structs]: types/struct.md +[trait]: types/trait-object.md +[tuples]: types/tuple.md +[type alias]: items/type-aliases.md +[type aliases]: items/type-aliases.md +[type boundaries]: trait-bounds.md +[type parameters]: types/parameters.md +[unions]: types/union.md diff --git a/src/types/array.md b/src/types/array.md index 92347e406..b0b45bfab 100644 --- a/src/types/array.md +++ b/src/types/array.md @@ -24,7 +24,7 @@ always bounds-checked in safe methods and operators. > Note: The [`Vec`] standard library type provides a heap-allocated resizable > array type. -[_Expression_]: ../expressions.html -[_Type_]: ../types.html#type-expressions +[_Expression_]: ../expressions.md +[_Type_]: ../types.md#type-expressions [`Vec`]: ../../std/vec/struct.Vec.html -[`usize`]: ../types/numeric.html#machine-dependent-integer-types +[`usize`]: ../types/numeric.md#machine-dependent-integer-types diff --git a/src/types/closure.md b/src/types/closure.md index ec4560581..80e2ed28b 100644 --- a/src/types/closure.md +++ b/src/types/closure.md @@ -165,13 +165,13 @@ Because captures are often by reference, the following general rules arise: unique immutable or mutable reference, and if all values it captures by copy or move are [`Clone`] or [`Copy`], respectively. -[`Clone`]: ../special-types-and-traits.html#clone -[`Copy`]: ../special-types-and-traits.html#copy +[`Clone`]: ../special-types-and-traits.md#clone +[`Copy`]: ../special-types-and-traits.md#copy [`FnMut`]: ../../std/ops/trait.FnMut.html [`FnOnce`]: ../../std/ops/trait.FnOnce.html [`Fn`]: ../../std/ops/trait.Fn.html -[`Send`]: ../special-types-and-traits.html#send -[`Sized`]: ../special-types-and-traits.html#sized -[`Sync`]: ../special-types-and-traits.html#sync -[closure expression]: ../expressions/closure-expr.html -[derived]: ../attributes.html#derive +[`Send`]: ../special-types-and-traits.md#send +[`Sized`]: ../special-types-and-traits.md#sized +[`Sync`]: ../special-types-and-traits.md#sync +[closure expression]: ../expressions/closure-expr.md +[derived]: ../attributes.md#derive diff --git a/src/types/enum.md b/src/types/enum.md index a8249dc1a..8f69dbad8 100644 --- a/src/types/enum.md +++ b/src/types/enum.md @@ -19,5 +19,5 @@ named reference to an [`enum` item]. [^enumtype]: The `enum` type is analogous to a `data` constructor declaration in ML, or a *pick ADT* in Limbo. -[`enum` item]: ../items/enumerations.html -[enumeration variant expression]: ../expressions/enum-variant-expr.html +[`enum` item]: ../items/enumerations.md +[enumeration variant expression]: ../expressions/enum-variant-expr.md diff --git a/src/types/function-item.md b/src/types/function-item.md index 3094b5f8e..f125196fb 100644 --- a/src/types/function-item.md +++ b/src/types/function-item.md @@ -46,12 +46,12 @@ let foo_ptr_2 = if want_i32 { All function items implement [`Fn`], [`FnMut`], [`FnOnce`], [`Copy`], [`Clone`], [`Send`], and [`Sync`]. -[`Clone`]: ../special-types-and-traits.html#clone -[`Copy`]: ../special-types-and-traits.html#copy +[`Clone`]: ../special-types-and-traits.md#clone +[`Copy`]: ../special-types-and-traits.md#copy [`FnMut`]: ../../std/ops/trait.FnMut.html [`FnOnce`]: ../../std/ops/trait.FnOnce.html [`Fn`]: ../../std/ops/trait.Fn.html -[`Send`]: ../special-types-and-traits.html#send -[`Sync`]: ../special-types-and-traits.html#sync -[coercion]: ../type-coercions.html -[function pointers]: ../types/function-pointer.html +[`Send`]: ../special-types-and-traits.md#send +[`Sync`]: ../special-types-and-traits.md#sync +[coercion]: ../type-coercions.md +[function pointers]: ../types/function-pointer.md diff --git a/src/types/function-pointer.md b/src/types/function-pointer.md index 999d6f013..64de4cce0 100644 --- a/src/types/function-pointer.md +++ b/src/types/function-pointer.md @@ -44,13 +44,13 @@ let bo: Binop = add; x = bo(5,7); ``` -[IDENTIFIER]: ../identifiers.html -[_ForLifetimes_]: ../items/generics.html#where-clauses -[_FunctionQualifiers_]: ../items/functions.html -[_TypeNoBounds_]: ../types.html#type-expressions -[_Type_]: ../types.html#type-expressions -[`extern`]: ../items/external-blocks.html -[closures]: ../types/closure.html -[extern function]: ../items/functions.html#extern-functions -[function items]: ../types/function-item.html -[unsafe function]: ../unsafe-functions.html +[IDENTIFIER]: ../identifiers.md +[_ForLifetimes_]: ../items/generics.md#where-clauses +[_FunctionQualifiers_]: ../items/functions.md +[_TypeNoBounds_]: ../types.md#type-expressions +[_Type_]: ../types.md#type-expressions +[`extern`]: ../items/external-blocks.md +[closures]: ../types/closure.md +[extern function]: ../items/functions.md#extern-functions +[function items]: ../types/function-item.md +[unsafe function]: ../unsafe-functions.md diff --git a/src/types/impl-trait.md b/src/types/impl-trait.md index fd08d0be9..d7beeda7a 100644 --- a/src/types/impl-trait.md +++ b/src/types/impl-trait.md @@ -33,5 +33,5 @@ type. They are written as `impl` followed by a set of trait bounds. -[_TraitBound_]: ../trait-bounds.html -[_TypeParamBounds_]: ../trait-bounds.html +[_TraitBound_]: ../trait-bounds.md +[_TypeParamBounds_]: ../trait-bounds.md diff --git a/src/types/pointer.md b/src/types/pointer.md index 24c80d3de..70d8d8c03 100644 --- a/src/types/pointer.md +++ b/src/types/pointer.md @@ -49,9 +49,9 @@ also have their addition data compared. The standard library contains additional 'smart pointer' types beyond references and raw pointers. -[Interior mutability]: ../interior-mutability.html -[_Lifetime_]: ../trait-bounds.html -[_TypeNoBounds_]: ../types.html#type-expressions -[`unsafe` operation]: ../unsafety.html -[dynamically sized types]: ../dynamically-sized-types.html -[temporary value]: ../expressions.html#temporary-lifetimes +[Interior mutability]: ../interior-mutability.md +[_Lifetime_]: ../trait-bounds.md +[_TypeNoBounds_]: ../types.md#type-expressions +[`unsafe` operation]: ../unsafety.md +[dynamically sized types]: ../dynamically-sized-types.md +[temporary value]: ../expressions.md#temporary-lifetimes diff --git a/src/types/slice.md b/src/types/slice.md index 798821685..e78027764 100644 --- a/src/types/slice.md +++ b/src/types/slice.md @@ -28,5 +28,5 @@ let slice: &[i32] = &boxed_array[..]; All elements of slices are always initialized, and access to a slice is always bounds-checked in safe methods and operators. -[_Type_]: ../types.html#type-expressions -[dynamically sized type]: ../dynamically-sized-types.html +[_Type_]: ../types.md#type-expressions +[dynamically sized type]: ../dynamically-sized-types.md diff --git a/src/types/struct.md b/src/types/struct.md index 8ddf36674..ac5989502 100644 --- a/src/types/struct.md +++ b/src/types/struct.md @@ -24,5 +24,5 @@ value that inhabits such a type. [^structtype]: `struct` types are analogous to `struct` types in C, the *record* types of the ML family, or the *struct* types of the Lisp family. -[struct expression]: ../expressions/struct-expr.html -[visibility modifiers]: ../visibility-and-privacy.html +[struct expression]: ../expressions/struct-expr.md +[visibility modifiers]: ../visibility-and-privacy.md diff --git a/src/types/textual.md b/src/types/textual.md index ade5e6b19..d90c89d64 100644 --- a/src/types/textual.md +++ b/src/types/textual.md @@ -13,4 +13,4 @@ unsigned bytes holding a sequence of UTF-8 code points. Since `str` is a instantiated through a pointer type, such as `&str`. [Unicode scalar value]: http://www.unicode.org/glossary/#unicode_scalar_value -[dynamically sized type]: ../dynamically-sized-types.html +[dynamically sized type]: ../dynamically-sized-types.md diff --git a/src/types/trait-object.md b/src/types/trait-object.md index 2ba41e8ea..974f71c6f 100644 --- a/src/types/trait-object.md +++ b/src/types/trait-object.md @@ -104,11 +104,11 @@ need to be expressed as part of the trait object. This lifetime is written as `Trait + 'a`. There are [defaults] that allow this lifetime to usually be inferred with a sensible choice. -[_TraitBound_]: ../trait-bounds.html -[_TypeParamBounds_]: ../types.html#type-expressions -[auto traits]: ../special-types-and-traits.html#auto-traits -[defaults]: ../lifetime-elision.html#default-trait-object-lifetimes -[dynamically sized types]: ../dynamically-sized-types.html +[_TraitBound_]: ../trait-bounds.md +[_TypeParamBounds_]: ../types.md#type-expressions +[auto traits]: ../special-types-and-traits.md#auto-traits +[defaults]: ../lifetime-elision.md#default-trait-object-lifetimes +[dynamically sized types]: ../dynamically-sized-types.md [issue 33140]: https://github.com/rust-lang/rust/issues/33140 -[object safe]: ../items/traits.html#object-safety -[supertraits]: ../items/traits.html#supertraits +[object safe]: ../items/traits.md#object-safety +[supertraits]: ../items/traits.md#supertraits diff --git a/src/types/tuple.md b/src/types/tuple.md index 2fb65c57d..789d98342 100644 --- a/src/types/tuple.md +++ b/src/types/tuple.md @@ -31,4 +31,4 @@ assert_eq!(p.1, "ten"); For historical reasons and convenience, the tuple type with no elements (`()`) is often called ‘unit’ or ‘the unit type’. -[_Type_]: ../types.html#type-expressions +[_Type_]: ../types.md#type-expressions diff --git a/src/types/union.md b/src/types/union.md index 08ba43cd3..82a010cd4 100644 --- a/src/types/union.md +++ b/src/types/union.md @@ -11,5 +11,5 @@ implement [`Copy`]. The memory layout of a `union` is undefined by default, but the `#[repr(...)]` attribute can be used to fix a layout. -[`Copy`]: ../special-types-and-traits.html#copy -[`union` item]: ../items/unions.html +[`Copy`]: ../special-types-and-traits.md#copy +[`union` item]: ../items/unions.md diff --git a/src/undocumented.md b/src/undocumented.md index 6cac6f8c7..084180e66 100644 --- a/src/undocumented.md +++ b/src/undocumented.md @@ -18,10 +18,10 @@ to shrink! [`libstd` facade]: https://github.com/rust-lang/rfcs/pull/40 [Trait reform]: https://github.com/rust-lang/rfcs/pull/48 [Attributes on `match` arms]: https://github.com/rust-lang/rfcs/pull/49 -[Attributes]: attributes.html +[Attributes]: attributes.md [Flexible target specification]: https://github.com/rust-lang/rfcs/pull/131 -[Conditional compilation]: attributes.html#conditional-compilation +[Conditional compilation]: attributes.md#conditional-compilation [Integer overflow not `unsafe`]: https://github.com/rust-lang/rfcs/pull/560 [`dllimport`]: https://github.com/rust-lang/rfcs/pull/1717 -[FFI attributes]: attributes.html#ffi-attributes +[FFI attributes]: attributes.md#ffi-attributes [define `crt_link`]: https://github.com/rust-lang/rfcs/pull/1721 diff --git a/src/unsafety.md b/src/unsafety.md index e9bb78652..274cf3949 100644 --- a/src/unsafety.md +++ b/src/unsafety.md @@ -12,9 +12,9 @@ Rust: - Calling an unsafe function (including an intrinsic or foreign function). - Implementing an [unsafe trait]. -[`Copy`]: special-types-and-traits.html#copy -[`union`]: items/unions.html -[mutable static variable]: items/static-items.html#mutable-statics -[external static variable]: items/external-blocks.html -[raw pointer]: types/pointer.html -[unsafe trait]: items/traits.html#unsafe-traits +[`Copy`]: special-types-and-traits.md#copy +[`union`]: items/unions.md +[mutable static variable]: items/static-items.md#mutable-statics +[external static variable]: items/external-blocks.md +[raw pointer]: types/pointer.md +[unsafe trait]: items/traits.md#unsafe-traits diff --git a/src/variables.md b/src/variables.md index f6589e394..662b678c9 100644 --- a/src/variables.md +++ b/src/variables.md @@ -1,7 +1,7 @@ # Variables A _variable_ is a component of a stack frame, either a named function parameter, -an anonymous [temporary](expressions.html#temporary-lifetimes), or a named local +an anonymous [temporary](expressions.md#temporary-lifetimes), or a named local variable. A _local variable_ (or *stack-local* allocation) holds a value directly, diff --git a/src/visibility-and-privacy.md b/src/visibility-and-privacy.md index 17d3cc426..e1751e851 100644 --- a/src/visibility-and-privacy.md +++ b/src/visibility-and-privacy.md @@ -235,4 +235,4 @@ When re-exporting a private item, it can be thought of as allowing the "privacy chain" being short-circuited through the reexport instead of passing through the namespace hierarchy as it normally would. -[_SimplePath_]: paths.html#simple-paths +[_SimplePath_]: paths.md#simple-paths