Update to mdbook 0.3.

This updates to mdbook 0.3 which uses relative links, which are much better
(the pages mostly work when viewing on GitHub for example).
This commit is contained in:
Eric Huss 2019-07-15 16:51:25 -07:00
parent c0c912d8bc
commit b0e0ad6490
90 changed files with 1049 additions and 1064 deletions

View File

@ -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.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
script:
- export PATH=$PATH:/home/travis/.cargo/bin && mdbook test

View File

@ -4,5 +4,5 @@ title = "The Rust Reference"
author = "The Rust Project Developers"
[output.html]
additional-css = ["src/theme/reference.css"]
additional-css = ["theme/reference.css"]
git-repository-url = "https://github.com/rust-lang-nursery/reference/"

View File

@ -85,11 +85,11 @@ to specify the symbol name.
pub fn name_in_rust() { }
```
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[`static` items]: items/static-items.html
[attribute]: attributes.html
[extern functions]: items/functions.html#extern-functions
[external blocks]: items/external-blocks.html
[function]: items/functions.html
[item]: items.html
[static]: items/static-items.html
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
[`static` items]: items/static-items.md
[attribute]: attributes.md
[extern functions]: items/functions.md#extern-functions
[external blocks]: items/external-blocks.md
[function]: items/functions.md
[item]: items.md
[static]: items/static-items.md

View File

@ -237,72 +237,72 @@ The following is an index of all built-in attributes.
- `feature` — Used to enable unstable or experimental compiler features. See
[The Unstable Book] for features implemented in `rustc`.
[Doc comments]: comments.html#doc-comments
[Doc comments]: comments.md#doc-comments
[ECMA-334]: https://www.ecma-international.org/publications/standards/Ecma-334.htm
[ECMA-335]: https://www.ecma-international.org/publications/standards/Ecma-335.htm
[Expression Attributes]: expressions.html#expression-attributes
[IDENTIFIER]: identifiers.html
[RAW_STRING_LITERAL]: tokens.html#raw-string-literals
[STRING_LITERAL]: tokens.html#string-literals
[Expression Attributes]: expressions.md#expression-attributes
[IDENTIFIER]: identifiers.md
[RAW_STRING_LITERAL]: tokens.md#raw-string-literals
[STRING_LITERAL]: tokens.md#string-literals
[The Rustdoc Book]: ../rustdoc/the-doc-attribute.html
[The Unstable Book]: ../unstable-book/index.html
[_DelimTokenTree_]: macros.html
[_LiteralExpression_]: expressions/literal-expr.html
[_SimplePath_]: paths.html#simple-paths
[`allow`]: attributes/diagnostics.html#lint-check-attributes
[`cfg_attr`]: conditional-compilation.html#the-cfg_attr-attribute
[`cfg`]: conditional-compilation.html#the-cfg-attribute
[`cold`]: attributes/codegen.html#the-cold-attribute
[`crate_name`]: crates-and-source-files.html#the-crate_name-attribute
[`crate_type`]: linkage.html
[`deny`]: attributes/diagnostics.html#lint-check-attributes
[`deprecated`]: attributes/diagnostics.html#the-deprecated-attribute
[`derive`]: attributes/derive.html
[`export_name`]: abi.html#the-export_name-attribute
[`forbid`]: attributes/diagnostics.html#lint-check-attributes
[`global_allocator`]: runtime.html#the-global_allocator-attribute
[`ignore`]: attributes/testing.html#the-ignore-attribute
[`inline`]: attributes/codegen.html#the-inline-attribute
[`link_name`]: items/external-blocks.html#the-link_name-attribute
[`link_section`]: abi.html#the-link_section-attribute
[`link`]: items/external-blocks.html#the-link-attribute
[`macro_export`]: macros-by-example.html#path-based-scope
[`macro_use`]: macros-by-example.html#the-macro_use-attribute
[`meta` macro fragment specifier]: macros-by-example.html
[`must_use`]: attributes/diagnostics.html#the-must_use-attribute
[`no_builtins`]: attributes/codegen.html#the-no_builtins-attribute
[`no_implicit_prelude`]: items/modules.html#prelude-items
[`no_link`]: items/extern-crates.html#the-no_link-attribute
[`no_main`]: crates-and-source-files.html#the-no_main-attribute
[`no_mangle`]: abi.html#the-no_mangle-attribute
[`no_std`]: crates-and-source-files.html#preludes-and-no_std
[`panic_handler`]: runtime.html#the-panic_handler-attribute
[`path`]: items/modules.html#the-path-attribute
[`proc_macro_attribute`]: procedural-macros.html#attribute-macros
[`proc_macro_derive`]: procedural-macros.html#derive-macros
[`proc_macro`]: procedural-macros.html#function-like-procedural-macros
[`recursion_limit`]: attributes/limits.html#the-recursion_limit-attribute
[`repr`]: type-layout.html#representations
[`should_panic`]: attributes/testing.html#the-should_panic-attribute
[`target_feature`]: attributes/codegen.html#the-target_feature-attribute
[`test`]: attributes/testing.html#the-test-attribute
[`type_length_limit`]: attributes/limits.html#the-type_length_limit-attribute
[`used`]: abi.html#the-used-attribute
[`warn`]: attributes/diagnostics.html#lint-check-attributes
[`windows_subsystem`]: runtime.html#the-windows_subsystem-attribute
[attribute macros]: procedural-macros.html#attribute-macros
[block expressions]: expressions/block-expr.html
[_DelimTokenTree_]: macros.md
[_LiteralExpression_]: expressions/literal-expr.md
[_SimplePath_]: paths.md#simple-paths
[`allow`]: attributes/diagnostics.md#lint-check-attributes
[`cfg_attr`]: conditional-compilation.md#the-cfg_attr-attribute
[`cfg`]: conditional-compilation.md#the-cfg-attribute
[`cold`]: attributes/codegen.md#the-cold-attribute
[`crate_name`]: crates-and-source-files.md#the-crate_name-attribute
[`crate_type`]: linkage.md
[`deny`]: attributes/diagnostics.md#lint-check-attributes
[`deprecated`]: attributes/diagnostics.md#the-deprecated-attribute
[`derive`]: attributes/derive.md
[`export_name`]: abi.md#the-export_name-attribute
[`forbid`]: attributes/diagnostics.md#lint-check-attributes
[`global_allocator`]: runtime.md#the-global_allocator-attribute
[`ignore`]: attributes/testing.md#the-ignore-attribute
[`inline`]: attributes/codegen.md#the-inline-attribute
[`link_name`]: items/external-blocks.md#the-link_name-attribute
[`link_section`]: abi.md#the-link_section-attribute
[`link`]: items/external-blocks.md#the-link-attribute
[`macro_export`]: macros-by-example.md#path-based-scope
[`macro_use`]: macros-by-example.md#the-macro_use-attribute
[`meta` macro fragment specifier]: macros-by-example.md
[`must_use`]: attributes/diagnostics.md#the-must_use-attribute
[`no_builtins`]: attributes/codegen.md#the-no_builtins-attribute
[`no_implicit_prelude`]: items/modules.md#prelude-items
[`no_link`]: items/extern-crates.md#the-no_link-attribute
[`no_main`]: crates-and-source-files.md#the-no_main-attribute
[`no_mangle`]: abi.md#the-no_mangle-attribute
[`no_std`]: crates-and-source-files.md#preludes-and-no_std
[`panic_handler`]: runtime.md#the-panic_handler-attribute
[`path`]: items/modules.md#the-path-attribute
[`proc_macro_attribute`]: procedural-macros.md#attribute-macros
[`proc_macro_derive`]: procedural-macros.md#derive-macros
[`proc_macro`]: procedural-macros.md#function-like-procedural-macros
[`recursion_limit`]: attributes/limits.md#the-recursion_limit-attribute
[`repr`]: type-layout.md#representations
[`should_panic`]: attributes/testing.md#the-should_panic-attribute
[`target_feature`]: attributes/codegen.md#the-target_feature-attribute
[`test`]: attributes/testing.md#the-test-attribute
[`type_length_limit`]: attributes/limits.md#the-type_length_limit-attribute
[`used`]: abi.md#the-used-attribute
[`warn`]: attributes/diagnostics.md#lint-check-attributes
[`windows_subsystem`]: runtime.md#the-windows_subsystem-attribute
[attribute macros]: procedural-macros.md#attribute-macros
[block expressions]: expressions/block-expr.md
[built-in attributes]: #built-in-attributes-index
[derive macro helper attributes]: procedural-macros.html#derive-macro-helper-attributes
[enum]: items/enumerations.html
[expression statement]: statements.html#expression-statements
[external blocks]: items/external-blocks.html
[functions]: items/functions.html
[generics]: items/generics.html
[implementations]: items/implementations.html
[item declarations]: items.html
[match expressions]: expressions/match-expr.html
[modules]: items/modules.html
[statements]: statements.html
[struct]: items/structs.html
[union]: items/unions.html
[derive macro helper attributes]: procedural-macros.md#derive-macro-helper-attributes
[enum]: items/enumerations.md
[expression statement]: statements.md#expression-statements
[external blocks]: items/external-blocks.md
[functions]: items/functions.md
[generics]: items/generics.md
[implementations]: items/implementations.md
[item declarations]: items.md
[match expressions]: expressions/match-expr.md
[modules]: items/modules.md
[statements]: statements.md
[struct]: items/structs.md
[union]: items/unions.md

View File

@ -139,15 +139,15 @@ feature detection on the x86 platforms.
> may be enabled or disabled for an entire crate with the
> [`-C target-feature`] flag.
[_MetaListNameValueStr_]: attributes.html#meta-item-attribute-syntax
[`-C target-cpu`]: ../rustc/codegen-options/index.html#target-cpu
[`-C target-feature`]: ../rustc/codegen-options/index.html#target-feature
[`is_x86_feature_detected`]: ../std/macro.is_x86_feature_detected.html
[`target_feature` conditional compilation option]: conditional-compilation.html#target_feature
[attribute]: attributes.html
[attributes]: attributes.html
[functions]: items/functions.html
[target architecture]: conditional-compilation.html#target_arch
[trait]: items/traits.html
[undefined behavior]: behavior-considered-undefined.html
[unsafe function]: unsafe-functions.html
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[`-C target-cpu`]: ../../rustc/codegen-options/index.html#target-cpu
[`-C target-feature`]: ../../rustc/codegen-options/index.html#target-feature
[`is_x86_feature_detected`]: ../../std/macro.is_x86_feature_detected.html
[`target_feature` conditional compilation option]: ../conditional-compilation.md#target_feature
[attribute]: ../attributes.md
[attributes]: ../attributes.md
[functions]: ../items/functions.md
[target architecture]: ../conditional-compilation.md#target_arch
[trait]: ../items/traits.md
[undefined behavior]: ../behavior-considered-undefined.md
[unsafe function]: ../unsafe-functions.md

View File

@ -33,10 +33,10 @@ impl<T: PartialEq> PartialEq for Foo<T> {
You can implement `derive` for your own traits through [procedural macros].
[_MetaListPaths_]: attributes.html#meta-item-attribute-syntax
[`Clone`]: ../std/clone/trait.Clone.html
[`PartialEq`]: ../std/cmp/trait.PartialEq.html
[`impl` item]: items/implementations.html
[items]: items.html
[derive macros]: procedural-macros.html#derive-macros
[procedural macros]: procedural-macros.html#derive-macros
[_MetaListPaths_]: ../attributes.md#meta-item-attribute-syntax
[`Clone`]: ../../std/clone/trait.Clone.html
[`PartialEq`]: ../../std/cmp/trait.PartialEq.html
[`impl` item]: ../items/implementations.md
[items]: ../items.md
[derive macros]: ../procedural-macros.md#derive-macros
[procedural macros]: ../procedural-macros.md#derive-macros

View File

@ -253,29 +253,29 @@ When used on a function in a trait implementation, the attribute does nothing.
> ```
[Clippy]: https://github.com/rust-lang/rust-clippy
[_MetaListNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_MetaListPaths_]: attributes.html#meta-item-attribute-syntax
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[`Drop`]: special-types-and-traits.html#drop
[attributes]: attributes.html
[block expression]: expressions/block-expr.html
[call expression]: expressions/call-expr.html
[enum variant]: items/enumerations.html
[enum]: items/enumerations.html
[expression statement]: statements.html#expression-statements
[expression]: expressions.html
[external block item]: items/external-blocks.html
[functions]: items/functions.html
[impl trait]: types/impl-trait.html
[implementation]: items/implementations.html
[item]: items.html
[let statement]: statements.html#let-statements
[module]: items/modules.html
[rustc book]: ../rustc/lints/index.html
[struct field]: items/structs.html
[struct]: items/structs.html
[trait declaration]: items/traits.html
[trait implementation items]: items/implementations.html#trait-implementations
[trait item]: items/traits.html
[traits]: items/traits.html
[union]: items/unions.html
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[_MetaListPaths_]: ../attributes.md#meta-item-attribute-syntax
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[`Drop`]: ../special-types-and-traits.md#drop
[attributes]: ../attributes.md
[block expression]: ../expressions/block-expr.md
[call expression]: ../expressions/call-expr.md
[enum variant]: ../items/enumerations.md
[enum]: ../items/enumerations.md
[expression statement]: ../statements.md#expression-statements
[expression]: ../expressions.md
[external block item]: ../items/external-blocks.md
[functions]: ../items/functions.md
[impl trait]: ../types/impl-trait.md
[implementation]: ../items/implementations.md
[item]: ../items.md
[let statement]: ../statements.md#let-statements
[module]: ../items/modules.md
[rustc book]: ../../rustc/lints/index.html
[struct field]: ../items/structs.md
[struct]: ../items/structs.md
[trait declaration]: ../items/traits.md
[trait implementation items]: ../items/implementations.md#trait-implementations
[trait item]: ../items/traits.md
[traits]: ../items/traits.md
[union]: ../items/unions.md

View File

@ -57,6 +57,6 @@ fn f<T>(x: T) {}
f((1, 2, 3, 4, 5, 6, 7, 8, 9));
```
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[attributes]: attributes.html
[crate]: crates-and-source-files.html
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[attributes]: ../attributes.md
[crate]: ../crates-and-source-files.md

View File

@ -82,8 +82,8 @@ fn mytest() {
}
```
[_MetaListNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[`Termination`]: ../std/process/trait.Termination.html
[`test` conditional compilation option]: conditional-compilation.html#test
[attributes]: attributes.html
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[`Termination`]: ../../std/process/trait.Termination.html
[`test` conditional compilation option]: ../conditional-compilation.md#test
[attributes]: ../attributes.md

View File

@ -52,7 +52,7 @@ code.
[undef]: http://llvm.org/docs/LangRef.html#undefined-values
[`offset`]: ../std/primitive.pointer.html#method.offset
[`std::ptr::copy_nonoverlapping_memory`]: ../std/ptr/fn.copy_nonoverlapping.html
[`target_feature`]: attributes/codegen.html#the-target_feature-attribute
[`target_feature`]: attributes/codegen.md#the-target_feature-attribute
[`UnsafeCell<U>`]: ../std/cell/struct.UnsafeCell.html
[`read_unaligned`]: ../std/ptr/fn.read_unaligned.html
[`write_unaligned`]: ../std/ptr/fn.write_unaligned.html

View File

@ -310,19 +310,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
[Testing]: attributes/testing.html
[_Attr_]: attributes.html
[`--cfg`]: ../rustc/command-line-arguments.html#a--cfg-configure-the-compilation-environment
[`--test`]: ../rustc/command-line-arguments.html#a--test-build-a-test-harness
[IDENTIFIER]: identifiers.md
[RAW_STRING_LITERAL]: tokens.md#raw-string-literals
[STRING_LITERAL]: tokens.md#string-literals
[Testing]: attributes/testing.md
[_Attr_]: attributes.md
[`--cfg`]: ../rustc/command-line-arguments.html#--cfg-configure-the-compilation-environment
[`--test`]: ../rustc/command-line-arguments.html#--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
[`target_feature` attribute]: attributes/codegen.html#the-target_feature-attribute
[attribute]: attributes.html
[attributes]: attributes.html
[crate type]: linkage.html
[static C runtime]: linkage.html#static-and-dynamic-c-runtimes
[`target_feature` attribute]: attributes/codegen.md#the-target_feature-attribute
[attribute]: attributes.md
[attributes]: attributes.md
[crate type]: linkage.md
[static C runtime]: linkage.md#static-and-dynamic-c-runtimes

View File

@ -57,39 +57,39 @@ 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
[const functions]: items/functions.html#const-functions
[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
[const functions]: items/functions.md#const-functions
[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

View File

@ -152,21 +152,21 @@ or `-` (U+002D) characters.
in the Owens and Flatt module system, or a *configuration* in Mesa.
[Unicode alphanumeric]: ../std/primitive.char.html#method.is_alphanumeric
[_InnerAttribute_]: attributes.html
[_Item_]: items.html
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_InnerAttribute_]: attributes.md
[_Item_]: items.md
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
[_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
[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
[where clauses]: items/generics.html#where-clauses
[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
[where clauses]: items/generics.md#where-clauses

View File

@ -76,17 +76,17 @@ 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::ManuallyDrop`]: ../std/mem/struct.ManuallyDrop.html

View File

@ -23,10 +23,10 @@ types">DSTs</abbr>. 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

View File

@ -281,76 +281,76 @@ They are never allowed before:
[_AssignmentExpression_], [_CompoundAssignmentExpression_]).
[block expressions]: expressions/block-expr.html
[call expressions]: expressions/call-expr.html
[enum variant]: expressions/enum-variant-expr.html
[field]: expressions/field-expr.html
[functional update]: expressions/struct-expr.html#functional-update-syntax
[`if let`]: expressions/if-expr.html#if-let-expressions
[match]: expressions/match-expr.html
[method-call]: expressions/method-call-expr.html
[paths]: expressions/path-expr.html
[struct]: expressions/struct-expr.html
[tuple expressions]: expressions/tuple-expr.html
[`while let`]: expressions/loop-expr.html#predicate-pattern-loops
[block expressions]: expressions/block-expr.md
[call expressions]: expressions/call-expr.md
[enum variant]: expressions/enum-variant-expr.md
[field]: expressions/field-expr.md
[functional update]: expressions/struct-expr.md#functional-update-syntax
[`if let`]: expressions/if-expr.md#if-let-expressions
[match]: expressions/match-expr.md
[method-call]: expressions/method-call-expr.md
[paths]: expressions/path-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.html
[array indexing]: expressions/array-expr.html#array-and-slice-indexing-expressions
[array expressions]: expressions/array-expr.md
[array indexing]: expressions/array-expr.md#array-and-slice-indexing-expressions
[assign]: expressions/operator-expr.html#assignment-expressions
[borrow]: expressions/operator-expr.html#borrow-operators
[comparison]: expressions/operator-expr.html#comparison-operators
[compound assignment]: expressions/operator-expr.html#compound-assignment-expressions
[deref]: expressions/operator-expr.html#the-dereference-operator
[assign]: expressions/operator-expr.md#assignment-expressions
[borrow]: expressions/operator-expr.md#borrow-operators
[comparison]: expressions/operator-expr.md#comparison-operators
[compound assignment]: expressions/operator-expr.md#compound-assignment-expressions
[deref]: expressions/operator-expr.md#the-dereference-operator
[destructors]: destructors.html
[interior mutability]: interior-mutability.html
[`Box<T>`]: ../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
[destructors]: destructors.md
[interior mutability]: interior-mutability.md
[`Box<T>`]: ../std/boxed/struct.Box.md
[`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
[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
[scrutinee]: glossary.md#scrutinee
[slice]: types/slice.md
[statement]: statements.md
[static variables]: items/static-items.md
[Temporary values]: #temporary-lifetimes
[Variables]: variables.html
[Variables]: variables.md
[_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
[_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

View File

@ -10,7 +10,7 @@
> &nbsp;&nbsp; &nbsp;&nbsp; [_Expression_] ( `,` [_Expression_] )<sup>\*</sup> `,`<sup>?</sup>\
> &nbsp;&nbsp; | [_Expression_] `;` [_Expression_]
An _[array](types/array.html) expression_ can be written by
An _[array](../types/array.md) 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.
@ -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`
such as a [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];
@ -44,7 +44,7 @@ expressions].
> _IndexExpression_ :\
> &nbsp;&nbsp; [_Expression_] `[` [_Expression_] `]`
[Array](types/array.html) and [slice](types/slice.html)-typed expressions can be
[Array](../types/array.md) 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.
@ -81,11 +81,11 @@ 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
[IndexMut]: ../../std/ops/trait.IndexMut.html
[Index]: ../../std/ops/trait.Index.html
[Inner attributes]: ../attributes.md
[_Expression_]: ../expressions.md
[_InnerAttribute_]: ../attributes.md
[attributes on block expressions]: block-expr.md#attributes-on-block-expressions
[constant expression]: ../const_eval.md#constant-expressions
[memory location]: ../expressions.md#place-expressions-and-value-expressions

View File

@ -86,7 +86,7 @@ fn move_by_block_expression() {
> _UnsafeBlockExpression_ :\
> &nbsp;&nbsp; `unsafe` _BlockExpression_
_See [`unsafe` block](unsafe-blocks.html) for more information on when to use `unsafe`_
_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
operations]. Examples:
@ -129,24 +129,24 @@ 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
[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/diagnostics.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`]: loop-expr.md#iterator-loops
[`loop`]: loop-expr.md#infinite-loops
[`while let`]: loop-expr.md#predicate-pattern-loops
[`while`]: loop-expr.md#predicate-loops
[array expressions]: array-expr.md
[call expressions]: call-expr.md
[enum variant]: enum-variant-expr.md
[function]: ../items/functions.md
[inner attributes]: ../attributes.md
[method]: ../items/associated-items.md#methods
[statement]: ../statements.md
[statements]: ../statements.md
[struct]: struct-expr.md
[the lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
[tuple expressions]: tuple-expr.md
[unsafe operations]: ../unsafety.md
[value expressions]: ../expressions.md#place-expressions-and-value-expressions

View File

@ -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
@ -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
[_Expression_]: ../expressions.md

View File

@ -31,7 +31,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),
[infers how it captures each variable from its 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
@ -41,10 +41,10 @@ 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
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.
[`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.
@ -67,13 +67,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
[block]: block-expr.md
[function definitions]: ../items/functions.md
[patterns]: ../patterns.md
[_Expression_]: expressions.html
[_BlockExpression_]: expressions/block-expr.html
[_TypeNoBounds_]: types.html#type-expressions
[_Pattern_]: patterns.html
[_Type_]: types.html#type-expressions
[`let` binding]: statements.html#let-statements
[_Expression_]: ../expressions.md
[_BlockExpression_]: block-expr.md
[_TypeNoBounds_]: ../types.md#type-expressions
[_Pattern_]: ../patterns.md
[_Type_]: ../types.md#type-expressions
[`let` binding]: ../statements.md#let-statements

View File

@ -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]: struct-expr.md

View File

@ -27,7 +27,7 @@ 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,
[`Drop`](../special-types-and-traits.md#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.
@ -45,10 +45,10 @@ 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.md
[IDENTIFIER]: ../identifiers.md
[method call expression]: 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

View File

@ -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]: block-expr.md#attributes-on-block-expressions

View File

@ -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_]: block-expr.md
[_Expression_]: ../expressions.md
[_LazyBooleanOperatorExpression_]: operator-expr.md#lazy-boolean-operators
[_MatchArmPatterns_]: 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]: match-expr.md
[scrutinee]: ../glossary.md#scrutinee

View File

@ -12,7 +12,7 @@
> &nbsp;&nbsp; | [FLOAT_LITERAL]\
> &nbsp;&nbsp; | [BOOLEAN_LITERAL]
A _literal expression_ consists of one of the [literal](tokens.html#literals)
A _literal expression_ consists of one of the [literal](../tokens.md#literals)
forms described earlier. It directly describes a number, character, string,
or boolean value.
@ -22,12 +22,12 @@ 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.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

View File

@ -37,7 +37,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
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).
@ -282,11 +282,11 @@ and the `loop` must have a type compatible with each `break` expression.
`break` without an expression is considered identical to `break` with
expression `()`.
[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
[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels
[_BlockExpression_]: block-expr.md
[_Expression_]: ../ expressions.md
[_MatchArmPatterns_]: match-expr.md
[_Pattern_]: ../patterns.md
[`match` expression]: match-expr.md
[scrutinee]: ../glossary.md#scrutinee
[temporary values]: ../expressions.md#temporary-lifetimes

View File

@ -134,21 +134,21 @@ 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
[`cold`]: attributes/codegen.html#the-cold-attribute
[lint check attributes]: attributes/diagnostics.html#lint-check-attributes
[Range Expression]: expressions/range-expr.html
[_Expression_]: ../expressions.md
[_BlockExpression_]: 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
[`cold`]: ../attributes/codegen.md#the-cold-attribute
[lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
[Range Expression]: range-expr.md
[_Pattern_]: patterns.html
[pattern]: patterns.html
[Inner attributes]: attributes.html
[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
[_Pattern_]: ../patterns.md
[pattern]: ../patterns.md
[Inner attributes]: ../attributes.md
[Range Pattern]: ../patterns.md#range-patterns
[attributes on block expressions]: block-expr.md#attributes-on-block-expressions
[binding mode]: ../patterns.md#binding-modes
[scrutinee]: ../glossary.md#scrutinee

View File

@ -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<f32, _> = "3.14".parse();
@ -97,13 +97,13 @@ method and you'll be fine.
</div>
[_CallParams_]: expressions/call-expr.html
[_Expression_]: expressions.html
[_PathExprSegment_]: paths.html#paths-in-expressions
[visible]: visibility-and-privacy.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_]: call-expr.md
[_Expression_]: ../expressions.md
[_PathExprSegment_]: ../paths.md#paths-in-expressions
[visible]: ../visibility-and-privacy.md
[trait objects]: ../types/trait-object.md
[disambiguate call]: call-expr.md#disambiguating-function-calls
[disambiguating function call syntax]: call-expr.md#disambiguating-function-calls
[dereference]: operator-expr.md#the-dereference-operator
[methods]: ../items/associated-items.md#methods
[unsized coercion]: ../type-coercions.md#unsized-coercions

View File

@ -85,14 +85,14 @@ let a = & & & & mut 10;
> &nbsp;&nbsp; `*` [_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::DerefMut::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,9 +398,9 @@ 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
and [either copies or 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.
@ -441,12 +441,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
@ -459,5 +459,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

View File

@ -24,10 +24,10 @@ let push_integer = Vec::<i32>::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]: block-expr.md#unsafe-blocks

View File

@ -68,11 +68,11 @@ for i in 1..11 {
}
```
[_Expression_]: expressions.html
[_Expression_]: ../expressions.md
[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::Range]: ../ https:/doc.rust-lang.org/std/ops/struct.Range.md
[std::ops::RangeFrom]: ../ https:/doc.rust-lang.org/std/ops/struct.RangeFrom.md
[std::ops::RangeTo]: ../ https:/doc.rust-lang.org/std/ops/struct.RangeTo.md
[std::ops::RangeFull]: ../ https:/doc.rust-lang.org/std/ops/struct.RangeFull.md
[std::ops::RangeInclusive]: ../ https:/doc.rust-lang.org/std/ops/struct.RangeInclusive.md
[std::ops::RangeToInclusive]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html

View File

@ -20,4 +20,4 @@ fn max(a: i32, b: i32) -> i32 {
}
```
[_Expression_]: expressions.html
[_Expression_]: ../expressions.md

View File

@ -138,20 +138,20 @@ 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]: block-expr.md#attributes-on-block-expressions
[call expression]: call-expr.md
[if let]: if-expr.md#if-let-expressions
[if]: if-expr.md#if-expressions
[loop]: loop-expr.md
[match]: match-expr.md
[parentheses]: http://localhost:3000/expressions/grouped-expr.html
[struct]: items/structs.html
[union]: items/unions.html
[visible]: visibility-and-privacy.html
[scrutinee]: glossary.html#scrutinee
[struct]: ../items/structs.md
[union]: ../items/unions.md
[visible]: ../visibility-and-privacy.md
[scrutinee]: ../glossary.md#scrutinee

View File

@ -10,7 +10,7 @@
> &nbsp;&nbsp; ( [_Expression_] `,` )<sup>+</sup> [_Expression_]<sup>?</sup>
Tuples are written by enclosing zero or more comma-separated expressions in
parentheses. They are used to create [tuple-typed](types/tuple.html)
parentheses. They are used to create [tuple-typed](../types/tuple.md)
values.
```rust
@ -39,9 +39,9 @@ expressions].
> _TupleIndexingExpression_ :\
> &nbsp;&nbsp; [_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.
@ -54,8 +54,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]: block-expr.md#attributes-on-block-expressions

View File

@ -159,18 +159,18 @@ but is not limited to: process termination or corruption; improper, incorrect,
or unintended computation; or platform-specific results.
[More][undefined-behavior].
[alignment]: type-layout.html#size-and-alignment
[alignment]: type-layout.md#size-and-alignment
[associated item]: #associated-item
[enums]: items/enumerations.html
[enums]: items/enumerations.md
[free item]: #free-item
[implementation]: items/implementations.html
[implementations]: items/implementations.html
[inherent implementation]: items/implementations.html#inherent-implementations
[item]: items.html
[method]: items/associated-items.html#methods
[object safety]: items/traits.html#object-safety
[structs]: items/structs.html
[trait objects]: types/trait-object.html
[traits]: items/traits.html
[undefined-behavior]: behavior-considered-undefined.html
[unions]: items/unions.html
[implementation]: items/implementations.md
[implementations]: items/implementations.md
[inherent implementation]: items/implementations.md#inherent-implementations
[item]: items.md
[method]: items/associated-items.md#methods
[object safety]: items/traits.md#object-safety
[structs]: items/structs.md
[trait objects]: types/trait-object.md
[traits]: items/traits.md
[undefined-behavior]: behavior-considered-undefined.md
[unions]: items/unions.md

View File

@ -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

View File

@ -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::cell::UnsafeCell<T>`]: ../std/cell/struct.UnsafeCell.html
[`std::cell::RefCell<T>`]: ../std/cell/struct.RefCell.html
[`std::sync::atomic`]: ../std/sync/atomic/index.html

View File

@ -136,12 +136,12 @@ attention to making those sections the best that they can be.
[standard library]: ../std/index.html
[the Rust Reference repository]: https://github.com/rust-lang-nursery/reference/
[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
[Notation]: notation.html
[Notation]: notation.md
[Discord]: https://discord.gg/rust-lang

View File

@ -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

View File

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

View File

@ -86,11 +86,11 @@ m!(const _: () = (););
// const _: () = ();
```
[associated]: glossary.html#associated-item
[constant value]: const_eval.html#constant-expressions
[free]: glossary.html#free-item
[static lifetime elision]: lifetime-elision.html#static-lifetime-elision
[IDENTIFIER]: identifiers.html
[underscore imports]: items/use-declarations.html#underscore-imports
[_Type_]: types.html#type-expressions
[_Expression_]: expressions.html
[associated]: ../glossary.md#associated-item
[constant value]: ../const_eval.md#constant-expressions
[free]: ../glossary.md#free-item
[static lifetime elision]: ../lifetime-elision.md#static-lifetime-elision
[IDENTIFIER]: ../identifiers.md
[underscore imports]: use-declarations.md#underscore-imports
[_Type_]: ../types.md#type-expressions
[_Expression_]: ../expressions.md

View File

@ -131,16 +131,16 @@ 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
[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.md
[_Generics_]: generics.md
[_WhereClause_]: generics.md#where-clauses
[_Expression_]: ../expressions.md
[_TupleFields_]: structs.md
[_StructFields_]: structs.md
[enumerated type]: ../types/enum.md
[`mem::discriminant`]: ../../std/mem/fn.discriminant.html
[numeric cast]: ../expressions/operator-expr.md#semantics
[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

View File

@ -102,12 +102,12 @@ The *`no_link` attribute* may be specified on an `extern crate` item to
prevent linking the crate into the output. This is commonly used to load a
crate to access only its macros.
[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]: macros-by-example.html#the-macro_use-attribute
[`macro_use` attribute]: ../macros-by-example.md#the-macro_use-attribute
[`alloc`]: https://doc.rust-lang.org/alloc/
[`no_implicit_prelude`]: items/modules.html#prelude-items
[`no_std`]: crates-and-source-files.html#preludes-and-no_std
[`no_implicit_prelude`]: modules.md#prelude-items
[`no_std`]: ../crates-and-source-files.md#preludes-and-no_std
[`proc_macro`]: https://doc.rust-lang.org/proc_macro/
[`test`]: https://doc.rust-lang.org/test/
[use declarations]: items/use-declarations.html
[use declarations]: use-declarations.md

View File

@ -163,16 +163,16 @@ extern {
}
```
[IDENTIFIER]: identifiers.html
[IDENTIFIER]: ../identifiers.md
[WebAssembly module]: https://webassembly.github.io/spec/core/syntax/modules.html
[_Abi_]: items/functions.html
[_FunctionReturnType_]: items/functions.html
[_Generics_]: items/generics.html
[_InnerAttribute_]: attributes.html
[_MetaListNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_OuterAttribute_]: attributes.html
[_Type_]: types.html#type-expressions
[_Visibility_]: visibility-and-privacy.html
[_WhereClause_]: items/generics.html#where-clauses
[attributes]: attributes.html
[_Abi_]: functions.md
[_FunctionReturnType_]: functions.md
[_Generics_]: generics.md
[_InnerAttribute_]: ../attributes.md
[_MetaListNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[_MetaNameValueStr_]: ../attributes.md#meta-item-attribute-syntax
[_OuterAttribute_]: ../attributes.md
[_Type_]: ../types.md#type-expressions
[_Visibility_]: ../visibility-and-privacy.md
[_WhereClause_]: generics.md#where-clauses
[attributes]: ../attributes.md

View File

@ -212,34 +212,34 @@ 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
[_Pattern_]: patterns.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/diagnostics.html#lint-check-attributes
[the procedural macro attributes]: procedural-macros.html
[the testing attributes]: attributes/testing.html
[the optimization hint attributes]: attributes/codegen.html#optimization-hints
[`deprecated`]: attributes/diagnostics.html#the-deprecated-attribute
[`doc`]: ../rustdoc/the-doc-attribute.html
[`must_use`]: attributes/diagnostics.html#the-must_use-attribute
[patterns]: patterns.html
[`?Sized`]: trait-bounds.html#sized
[trait bounds]: trait-bounds.html
[`export_name`]: abi.html#the-export_name-attribute
[`link_section`]: abi.html#the-link_section-attribute
[`no_mangle`]: abi.html#the-no_mangle-attribute
[IDENTIFIER]: ../identifiers.md
[RAW_STRING_LITERAL]: ../tokens.md#raw-string-literals
[STRING_LITERAL]: ../tokens.md#string-literals
[_BlockExpression_]: ../expressions/block-expr.md
[_Generics_]: generics.md
[_Pattern_]: ../patterns.md
[_Type_]: ../types.md#type-expressions
[_WhereClause_]: generics.md#where-clauses
[const context]: ../const_eval.md#const-context
[external blocks]: 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]: traits.md
[attributes]: ../attributes.md
[`cfg`]: ../conditional-compilation.md
[the lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
[the procedural macro attributes]: ../procedural-macros.md
[the testing attributes]: ../attributes/testing.md
[the optimization hint attributes]: ../attributes/codegen.md#optimization-hints
[`deprecated`]: ../attributes/diagnostics.md#the-deprecated-attribute
[`doc`]: ../../rustdoc/the-doc-attribute.html
[`must_use`]: ../attributes/diagnostics.md#the-must_use-attribute
[patterns]: ../patterns.md
[`?Sized`]: ../trait-bounds.md#sized
[trait bounds]: ../trait-bounds.md
[`export_name`]: ../abi.md#the-export_name-attribute
[`link_section`]: ../abi.md#the-link_section-attribute
[`no_mangle`]: ../abi.md#the-no_mangle-attribute

View File

@ -100,22 +100,22 @@ generic parameter.
}
```
[IDENTIFIER]: identifiers.html
[LIFETIME_OR_LABEL]: tokens.html#lifetimes-and-loop-labels
[IDENTIFIER]: ../identifiers.md
[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels
[_LifetimeBounds_]: trait-bounds.html
[_Lifetime_]: trait-bounds.html
[_OuterAttribute_]: attributes.html
[_Type_]: types.html#type-expressions
[_TypeParamBounds_]: trait-bounds.html
[_LifetimeBounds_]: ../trait-bounds.md
[_Lifetime_]: ../trait-bounds.md
[_OuterAttribute_]: ../attributes.md
[_Type_]: ../types.md#type-expressions
[_TypeParamBounds_]: ../trait-bounds.md
[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
[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

View File

@ -202,25 +202,25 @@ attributes must come before any associated items. That attributes that have
meaning here are [`cfg`], [`deprecated`], [`doc`], and [the lint check
attributes].
[_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
[associated functions]: items/associated-items.html#associated-functions-and-methods
[associated constants]: items/associated-items.html#associated-constants
[attributes]: attributes.html
[`cfg`]: conditional-compilation.html
[`deprecated`]: attributes/diagnostics.html#the-deprecated-attribute
[`doc`]: ../rustdoc/the-doc-attribute.html
[path]: paths.html
[the lint check attributes]: attributes/diagnostics.html#lint-check-attributes
[Unsafe traits]: items/traits.html#unsafe-traits
[_ConstantItem_]: constant-items.md
[_Function_]: functions.md
[_Generics_]: generics.md
[_InnerAttribute_]: ../attributes.md
[_MacroInvocationSemi_]: ../macros.md#macro-invocation
[_Method_]: associated-items.md#methods
[_OuterAttribute_]: ../attributes.md
[_TypeAlias_]: type-aliases.md
[_TypePath_]: ../paths.md#paths-in-types
[_Type_]: ../types.md#type-expressions
[_Visibility_]: ../visibility-and-privacy.md
[_WhereClause_]: generics.md#where-clauses
[trait]: traits.md
[associated functions]: associated-items.md#associated-functions-and-methods
[associated constants]: associated-items.md#associated-constants
[attributes]: ../attributes.md
[`cfg`]: ../conditional-compilation.md
[`deprecated`]: ../attributes/diagnostics.md#the-deprecated-attribute
[`doc`]: ../../rustdoc/the-doc-attribute.html
[path]: ../paths.md
[the lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
[Unsafe traits]: traits.md#unsafe-traits

View File

@ -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
[_InnerAttribute_]: ../attributes.md
[_Item_]: ../items.md
[`#[macro_use]`]: macros-by-example.html#the-macro_use-attribute
[`cfg`]: conditional-compilation.html
[`deprecated`]: attributes/diagnostics.html#the-deprecated-attribute
[`doc`]: ../rustdoc/the-doc-attribute.html
[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/diagnostics.html#lint-check-attributes
[`cfg`]: ../conditional-compilation.md
[`deprecated`]: ../attributes/diagnostics.md#the-deprecated-attribute
[`doc`]: ../../rustdoc/the-doc-attribute.html
[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/diagnostics.md#lint-check-attributes

View File

@ -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]: 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

View File

@ -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,11 +78,11 @@ 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
[`repr` attribute]: ../type-layout.md#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
[_OuterAttribute_]: ../attributes.md
[IDENTIFIER]: ../identifiers.md
[_Generics_]: generics.md
[_WhereClause_]: generics.md#where-clauses
[_Visibility_]: ../visibility-and-privacy.md
[_Type_]: ../types.md#type-expressions

View File

@ -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](associated-items.md#associated-functions-and-methods)
- [types](associated-items.md#associated-types)
- [constants](associated-items.md#associated-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,30 +204,30 @@ trait T {
}
```
[IDENTIFIER]: identifiers.html
[WildcardPattern]: patterns.html#wildcard-pattern
[_BlockExpression_]: expressions/block-expr.html
[_Expression_]: expressions.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
[IDENTIFIER]: ../identifiers.md
[WildcardPattern]: ../patterns.md#wildcard-pattern
[_BlockExpression_]: ../expressions/block-expr.md
[_Expression_]: ../expressions.md
[_FunctionQualifiers_]: functions.md
[_FunctionReturnType_]: functions.md
[_Generics_]: generics.md
[_MacroInvocationSemi_]: ../macros.md#macro-invocation
[_OuterAttribute_]: ../attributes.md
[_Pattern_]: ../patterns.md
[_SelfParam_]: associated-items.md#methods
[_TypeParamBounds_]: ../trait-bounds.md
[_Type_]: ../types.md#type-expressions
[_WhereClause_]: generics.md#where-clauses
[bounds]: ../trait-bounds.md
[trait object]: ../types/trait-object.md
[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]: associated-items.md
[method]: associated-items.md#methods
[implementations]: implementations.md
[generics]: generics.md
[where clauses]: generics.md#where-clauses
[generic functions]: functions.md#generic-functions
[unsafe]: ../unsafety.md
[trait implementation]: implementations.md#trait-implementations
[`Send`]: ../special-types-and-traits.md#send
[`Sync`]: ../special-types-and-traits.md#sync

View File

@ -10,7 +10,7 @@ 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
[type]: ../types.md
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 +29,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_]: generics.md
[_WhereClause_]: generics.md#where-clauses
[_Type_]: ../types.md#type-expressions

View File

@ -158,8 +158,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
[`transmute`]: ../std/mem/fn.transmute.html
[IDENTIFIER]: ../identifiers.md
[_Generics_]: generics.md
[_WhereClause_]: generics.md#where-clauses
[_StructFields_]: structs.md
[`transmute`]: ../../std/mem/fn.transmute.html

View File

@ -14,9 +14,9 @@ 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]: modules.md
[blocks]: ../expressions/block-expr.md
Use declarations support a number of convenient shortcuts:
@ -195,8 +195,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`]: extern-crates.md
[extern prelude]: extern-crates.md#extern-prelude
[path qualifiers]: ../paths.md#path-qualifiers

View File

@ -116,14 +116,14 @@ is possible to declare a variable or method with the name `union`.
> **<sup>Lexer 2015</sup>**\
> 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

View File

@ -169,11 +169,11 @@ 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
[closure trait]: types/closure.md
[constant]: items/constant-items.md
[function item]: types/function-item.md
[function pointer]: types/function-pointer.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
[static]: items/static-items.md
[trait object]: types/trait-object.md

View File

@ -210,6 +210,6 @@ a statically linked binary on MSVC you would execute:
RUSTFLAGS='-C target-feature=+crt-static' cargo build --target x86_64-pc-windows-msvc
```
[`cfg` attribute `target_feature` option]: conditional-compilation.html#target_feature
[configuration option]: conditional-compilation.html
[procedural macros]: procedural-macros.html
[`cfg` attribute `target_feature` option]: conditional-compilation.md#target_feature
[configuration option]: conditional-compilation.md
[procedural macros]: procedural-macros.md

View File

@ -372,6 +372,6 @@ why particular matchers are legal and others are not.
* `($($e:expr)*)` : illegal, because expr NTs are not in FOLLOW(expr NT).
[Macros by Example]: macros-by-example.html
[Macros by Example]: macros-by-example.md
[RFC 550]: https://github.com/rust-lang/rfcs/blob/master/text/0550-macro-future-proofing.html
[tracking issue]: https://github.com/rust-lang/rust/issues/56575

View File

@ -472,24 +472,24 @@ expansions, taking separators into account. This means:
For more detail, see the [formal specification].
[Hygiene]: #hygiene
[IDENTIFIER]: identifiers.html
[IDENTIFIER_OR_KEYWORD]: identifiers.html
[LIFETIME_TOKEN]: tokens.html#lifetimes-and-loop-labels
[IDENTIFIER]: identifiers.md
[IDENTIFIER_OR_KEYWORD]: identifiers.md
[LIFETIME_TOKEN]: tokens.md#lifetimes-and-loop-labels
[Metavariables]: #metavariables
[Repetitions]: #repetitions
[_BlockExpression_]: expressions/block-expr.html
[_DelimTokenTree_]: macros.html
[_Expression_]: expressions.html
[_Item_]: items.html
[_LiteralExpression_]: expressions/literal-expr.html
[_MetaItem_]: attributes.html#meta-item-attribute-syntax
[_MetaListIdents_]: attributes.html#meta-item-attribute-syntax
[_Pattern_]: patterns.html
[_Statement_]: statements.html
[_TokenTree_]: macros.html#macro-invocation
[_Token_]: tokens.html
[_TypePath_]: paths.html#paths-in-types
[_Type_]: types.html#type-expressions
[_Visibility_]: visibility-and-privacy.html
[formal specification]: macro-ambiguity.html
[token]: tokens.html
[_BlockExpression_]: expressions/block-expr.md
[_DelimTokenTree_]: macros.md
[_Expression_]: expressions.md
[_Item_]: items.md
[_LiteralExpression_]: expressions/literal-expr.md
[_MetaItem_]: attributes.md#meta-item-attribute-syntax
[_MetaListIdents_]: attributes.md#meta-item-attribute-syntax
[_Pattern_]: patterns.md
[_Statement_]: statements.md
[_TokenTree_]: macros.md#macro-invocation
[_Token_]: tokens.md
[_TypePath_]: paths.md#paths-in-types
[_Type_]: types.md#type-expressions
[_Visibility_]: visibility-and-privacy.md
[formal specification]: macro-ambiguity.md
[token]: tokens.md

View File

@ -86,16 +86,16 @@ 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
[delimiters]: tokens.html#delimiters
[expressions]: expressions.html
[items]: items.html
[`macro_rules`]: macros-by-example.html
[patterns]: patterns.html
[statements]: statements.html
[types]: types.html
[visibility qualifiers]: visibility-and-privacy.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
[delimiters]: tokens.md#delimiters
[expressions]: expressions.md
[items]: items.md
[`macro_rules`]: macros-by-example.md
[patterns]: patterns.md
[statements]: statements.md
[types]: types.md
[visibility qualifiers]: visibility-and-privacy.md

View File

@ -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

View File

@ -353,19 +353,19 @@ mod without { // ::without
```
[_GenericArgs_]: #paths-in-expressions
[_Lifetime_]: trait-bounds.html
[_Type_]: types.html#type-expressions
[item]: items.html
[variable]: variables.html
[implementations]: items/implementations.html
[use declarations]: items/use-declarations.html
[IDENTIFIER]: identifiers.html
[`use`]: items/use-declarations.html
[attributes]: attributes.html
[expressions]: expressions.html
[macro transcribers]: macros-by-example.html
[macros]: macros-by-example.html
[patterns]: patterns.html
[trait implementations]: items/implementations.html#trait-implementations
[traits]: items/traits.html
[visibility]: visibility-and-privacy.html
[_Lifetime_]: trait-bounds.md
[_Type_]: types.md#type-expressions
[item]: items.md
[variable]: variables.md
[implementations]: items/implementations.md
[use declarations]: items/use-declarations.md
[IDENTIFIER]: identifiers.md
[`use`]: items/use-declarations.md
[attributes]: attributes.md
[expressions]: expressions.md
[macro transcribers]: macros-by-example.md
[macros]: macros-by-example.md
[patterns]: patterns.md
[trait implementations]: items/implementations.md#trait-implementations
[traits]: items/traits.md
[visibility]: visibility-and-privacy.md

View File

@ -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
> &nbsp;&nbsp; | `-`<sup>?</sup> [INTEGER_LITERAL]\
> &nbsp;&nbsp; | `-`<sup>?</sup> [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.
> &nbsp;&nbsp; [_OuterAttribute_] <sup>\*</sup>\
> &nbsp;&nbsp; `..`
[_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

View File

@ -269,25 +269,25 @@ fn invoke4() {}
[`TokenStream`]: ../proc_macro/struct.TokenStream.html
[`TokenStream`s]: ../proc_macro/struct.TokenStream.html
[`compile_error`]: ../std/macro.compile_error.html
[`derive` attribute]: attributes/derive.html
[`derive` attribute]: attributes/derive.md
[`proc_macro` crate]: ../proc_macro/index.html
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
[Derive macros]: #derive-macros
[Attribute macros]: #attribute-macros
[Function-like macros]: #function-like-procedural-macros
[attribute]: attributes.html
[attributes]: attributes.html
[block]: expressions/block-expr.html
[crate type]: linkage.html
[attribute]: attributes.md
[attributes]: attributes.md
[block]: expressions/block-expr.md
[crate type]: linkage.md
[derive macro helper attributes]: #derive-macro-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
[module]: items/modules.html
[modules]: items/modules.html
[public]: visibility-and-privacy.html
[struct]: items/structs.html
[union]: items/unions.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
[module]: items/modules.md
[modules]: items/modules.md
[public]: visibility-and-privacy.md
[struct]: items/structs.md
[union]: items/unions.md

View File

@ -68,12 +68,12 @@ for non-`bin` [crate types].
#![windows_subsystem = "windows"]
```
[_MetaNameValueStr_]: attributes.html#meta-item-attribute-syntax
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
[`GlobalAlloc`]: ../alloc/alloc/trait.GlobalAlloc.html
[`PanicInfo`]: ../core/panic/struct.PanicInfo.html
[abort]: ../book/ch09-01-unrecoverable-errors-with-panic.html
[attribute]: attributes.html
[crate types]: linkage.html
[attribute]: attributes.md
[crate types]: linkage.md
[set_hook]: ../std/panic/fn.set_hook.html
[static item]: items/static-items.html
[static item]: items/static-items.md
[subsystem]: https://msdn.microsoft.com/en-us/library/fcc1zstk.aspx

View File

@ -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

View File

@ -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/diagnostics.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/diagnostics.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

View File

@ -82,6 +82,6 @@ struct Variance<'a, 'b, T, U: 'a> {
}
```
[function pointers]: types/function-pointer.html
[function pointers]: types/function-pointer.md
[Higher-ranked]: ../nomicon/hrtb.html
[trait objects]: types/trait-object.html
[trait objects]: types/trait-object.md

View File

@ -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
@ -439,7 +439,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
@ -500,7 +500,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
@ -525,7 +525,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
@ -593,41 +593,41 @@ them are referred to as "token trees" in [macros]. The three types of brackets
| `(` `)` | Parentheses |
[Inferred types]: types/inferred.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
[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
[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
[Inferred types]: types/inferred.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
[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
[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

View File

@ -134,13 +134,13 @@ fn call_on_ref_zero<F>(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
[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.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
[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

View File

@ -356,12 +356,12 @@ 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<T>`]: special-types-and-traits.html#phantomdatat
[`PhantomData<T>`]: special-types-and-traits.md#phantomdatat
[Default]: #the-default-representation
[`C`]: #the-c-representation
[primitive representations]: #primitive-representations

View File

@ -119,60 +119,60 @@ enum List<T> {
let a: List<i32> = 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
[_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.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
[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

View File

@ -24,7 +24,7 @@ always bounds-checked in safe methods and operators.
> Note: The [`Vec<T>`] standard library type provides a heap-allocated resizable
> array type.
[_Expression_]: expressions.html
[_Type_]: types.html#type-expressions
[`Vec<T>`]: ../std/vec/struct.Vec.html
[`usize`]: types/numeric.html#machine-dependent-integer-types
[_Expression_]: ../expressions.md
[_Type_]: ../types.md#type-expressions
[`Vec<T>`]: ../../std/vec/struct.Vec.html
[`usize`]: numeric.md#machine-dependent-integer-types

View File

@ -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/derive.html
[`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.md#send
[`Sized`]: ../special-types-and-traits.md#sized
[`Sync`]: ../special-types-and-traits.md#sync
[closure expression]: ../expressions/closure-expr.md
[derived]: ../attributes/derive.md

View File

@ -16,8 +16,8 @@ corresponding `enum` type, as well as the size needed to store a discriminant.
Enum types cannot be denoted *structurally* as types, but must be denoted by
named reference to an [`enum` item].
[^enumtype]: The `enum` type is analogous to a `data` constructor declaration in
[^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

View File

@ -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.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.md#send
[`Sync`]: ../special-types-and-traits.md#sync
[coercion]: ../type-coercions.md
[function pointers]: function-pointer.md

View File

@ -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]: closure.md
[extern function]: ../items/functions.md#extern-functions
[function items]: function-item.md
[unsafe function]: ../unsafe-functions.md

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -21,9 +21,9 @@ A _unit-like struct_ type is like a struct type, except that it has no fields.
The one value constructed by the associated [struct expression] is the only
value that inhabits such a type.
[^structtype]: `struct` types are analogous to `struct` types in C, the
[^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.
[`repr` attribute]: type-layout.html#representations
[struct expression]: expressions/struct-expr.html
[visibility modifiers]: visibility-and-privacy.html
[`repr` attribute]: ../type-layout.md#representations
[struct expression]: ../expressions/struct-expr.md
[visibility modifiers]: ../visibility-and-privacy.md

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -12,5 +12,5 @@ implement [`Copy`]. See the [item] documentation for further details.
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
[item]: items/unions.html
[`Copy`]: ../special-types-and-traits.md#copy
[item]: ../items/unions.md

View File

@ -12,8 +12,8 @@ Rust:
- Calling an unsafe function (including an intrinsic or foreign function).
- Implementing an [unsafe trait].
[`union`]: items/unions.html
[mutable]: items/static-items.html#mutable-statics
[external]: items/external-blocks.html
[raw pointer]: types/pointer.html
[unsafe trait]: items/traits.html#unsafe-traits
[`union`]: items/unions.md
[mutable]: items/static-items.md#mutable-statics
[external]: items/external-blocks.md
[raw pointer]: types/pointer.md
[unsafe trait]: items/traits.md#unsafe-traits

View File

@ -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,
@ -42,4 +42,4 @@ fn initialization_example() {
}
```
[`if` expression]: expressions/if-expr.html#if-expressions
[`if` expression]: expressions/if-expr.md#if-expressions

View File

@ -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

View File

@ -53,21 +53,6 @@ p.warning a {
color: rgb(0, 136, 204)
}
/* color hyperlinked inline code items identically to normal links */
.light a > .hljs {
color: #4183c4;
}
.rust a > .hljs,
.coal a > .hljs,
.navy a > .hljs {
color: #2b79a2;
}
.ayu a > .hljs {
color: #0096cf;
}
/*
.parenthetical class used to keep e.g. "less-than symbol (<)" from wrapping
the end parenthesis onto its own line. Use in a span between the last word and
@ -120,4 +105,4 @@ main .warning p::before {
.navy main .warning p a,
.ayu main .warning p a {
color: #80d0d0
}
}