diff options
Diffstat (limited to 'src/doc/reference/src')
| -rw-r--r-- | src/doc/reference/src/attributes.md | 21 | ||||
| -rw-r--r-- | src/doc/reference/src/expressions.md | 13 | ||||
| -rw-r--r-- | src/doc/reference/src/identifiers.md | 6 | ||||
| -rw-r--r-- | src/doc/reference/src/items.md | 2 |
4 files changed, 22 insertions, 20 deletions
diff --git a/src/doc/reference/src/attributes.md b/src/doc/reference/src/attributes.md index 4a839676ed3..da43e1cc057 100644 --- a/src/doc/reference/src/attributes.md +++ b/src/doc/reference/src/attributes.md @@ -46,7 +46,7 @@ type int8_t = i8; ## Crate-only attributes - `crate_name` - specify the crate's crate name. -- `crate_type` - see [linkage](#linkage). +- `crate_type` - see [linkage](linkage.html). - `feature` - see [compiler features](#compiler-features). - `no_builtins` - disable optimizing certain code patterns to invocations of library functions that are assumed to exist @@ -106,7 +106,7 @@ On an `extern` block, the following attributes are interpreted: - `link` - indicate that a native library should be linked to for the declarations in this block to be linked correctly. `link` supports an optional `kind` key with three possible values: `dylib`, `static`, and `framework`. See - [external blocks](#external-blocks) for more about external blocks. Two + [external blocks](items.html#external-blocks) for more about external blocks. Two examples: `#[link(name = "readline")]` and `#[link(name = "CoreFoundation", kind = "framework")]`. - `linked_from` - indicates what native library this block of FFI items is @@ -149,7 +149,7 @@ On `struct`s: list of names `#[macro_use(foo, bar)]` restricts the import to just those macros named. The `extern crate` must appear at the crate root, not inside `mod`, which ensures proper function of the [`$crate` macro - variable](book/macros.html#The%20variable%20%24crate). + variable](../book/macros.html#the-variable-crate). - `macro_reexport` on an `extern crate` — re-export the named macros. @@ -159,7 +159,7 @@ On `struct`s: link it into the output. See the [macros section of the -book](book/macros.html#Scoping%20and%20macro%20import%2Fexport) for more information on +book](../book/macros.html#scoping-and-macro-importexport) for more information on macro scope. ## Miscellaneous attributes @@ -317,7 +317,8 @@ For any lint check `C`: The lint checks supported by the compiler can be found via `rustc -W help`, along with their default settings. [Compiler -plugins](book/compiler-plugins.html#lint-plugins) can provide additional lint checks. +plugins](../book/compiler-plugins.html#lint-plugins) can provide additional +lint checks. ```{.ignore} pub mod m1 { @@ -442,7 +443,7 @@ impl<T: PartialEq> PartialEq for Foo<T> { ``` You can implement `derive` for your own type through [procedural -macros](#procedural-macros). +macros](procedural-macros.html). ### Compiler Features @@ -464,10 +465,10 @@ considered off, and using the features will result in a compiler error. The currently implemented features of the reference compiler are: -* `advanced_slice_patterns` - See the [match expressions](#match-expressions) - section for discussion; the exact semantics of - slice patterns are subject to change, so some types - are still unstable. +* `advanced_slice_patterns` - See the [match + expressions](expressions.html#match-expressions) + section for discussion; the exact semantics of +slice patterns are subject to change, so some types are still unstable. * `slice_patterns` - OK, actually, slice patterns are just scary and completely unstable. diff --git a/src/doc/reference/src/expressions.md b/src/doc/reference/src/expressions.md index e2fb41e424b..c9c0496dac6 100644 --- a/src/doc/reference/src/expressions.md +++ b/src/doc/reference/src/expressions.md @@ -85,7 +85,7 @@ be copied if its type implements `Copy`. All others are moved. ## Literal expressions -A _literal expression_ consists of one of the [literal](tokens.md#literals) forms +A _literal expression_ consists of one of the [literal](tokens.html#literals) forms described earlier. It directly describes a number, character, string, boolean value, or the unit value. @@ -124,19 +124,19 @@ comma: ## Struct expressions There are several forms of struct expressions. A _struct expression_ -consists of the [path](#paths) of a [struct item](items.html#structs), followed +consists of the [path](paths.html) of a [struct item](items.html#structs), followed by a brace-enclosed list of zero or more comma-separated name-value pairs, providing the field values of a new instance of the struct. A field name can be any identifier, and is separated from its value expression by a colon. The location denoted by a struct field is mutable if and only if the enclosing struct is mutable. -A _tuple struct expression_ consists of the [path](#paths) of a [struct +A _tuple struct expression_ consists of the [path](paths.html) of a [struct item](items.html#structs), followed by a parenthesized list of one or more comma-separated expressions (in other words, the path of a struct item followed by a tuple expression). The struct item must be a tuple struct item. -A _unit-like struct expression_ consists only of the [path](#paths) of a +A _unit-like struct expression_ consists only of the [path](paths.html) of a [struct item](items.html#structs). The following are examples of struct expressions: @@ -217,7 +217,8 @@ A _method call_ consists of an expression followed by a single dot, an identifier, and a parenthesized expression-list. Method calls are resolved to 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](trait-objects.html). +the left-hand-side expression is an indirect [trait +object](types.html#trait-objects). ## Field expressions @@ -504,7 +505,7 @@ The `+`, `-`, `*`, `/`, `%`, `&`, `|`, `^`, `<<`, and `>>` operators may be composed with the `=` operator. The expression `lval OP= val` is equivalent to `lval = lval OP val`. For example, `x = x + 1` may be written as `x += 1`. -Any such expression always has the [`unit`](#tuple-types) type. +Any such expression always has the [`unit`](types.html#tuple-types) type. ### Operator precedence diff --git a/src/doc/reference/src/identifiers.md b/src/doc/reference/src/identifiers.md index 4df68b39b91..de657e3e312 100644 --- a/src/doc/reference/src/identifiers.md +++ b/src/doc/reference/src/identifiers.md @@ -13,12 +13,12 @@ Or * The identifier is more than one character, `_` alone is not an identifier * The remaining characters have property `XID_continue` -that does _not_ occur in the set of [keywords][keywords]. +that does _not_ occur in the set of [keywords]. > **Note**: `XID_start` and `XID_continue` as character properties cover the > character ranges used to form the more familiar C and Java language-family > identifiers. -keywords: ../grammar.html#keywords +[keywords]: ../grammar.html#keywords [^non_ascii_idents]: Non-ASCII characters in identifiers are currently feature - gated. This is expected to improve soon. \ No newline at end of file + gated. This is expected to improve soon. diff --git a/src/doc/reference/src/items.md b/src/doc/reference/src/items.md index ccace77795c..ba3f4195ba6 100644 --- a/src/doc/reference/src/items.md +++ b/src/doc/reference/src/items.md @@ -5,7 +5,7 @@ nested set of [modules]. Every crate has a single "outermost" anonymous module; all further items within the crate have [paths] within the module tree of the crate. -[modules]: modules.html +[modules]: #modules [paths]: paths.html Items are entirely determined at compile-time, generally remain fixed during |
