diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-11 19:58:57 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-05-11 19:58:57 +0530 |
| commit | f2c2736cd8ac05315bd32e82e7433a168631bb36 (patch) | |
| tree | 46a9bd9db71858539475d1433e9003c2ddf98001 /src/doc/reference.md | |
| parent | 8f01d8d7c290f24980e2915b2df14d244eb430a2 (diff) | |
| parent | aabdd8e0a607643915020c072923fdf135358921 (diff) | |
| download | rust-f2c2736cd8ac05315bd32e82e7433a168631bb36.tar.gz rust-f2c2736cd8ac05315bd32e82e7433a168631bb36.zip | |
Rollup merge of #25290 - bluss:docfixes, r=steveklabnik
Several Minor API / Reference Documentation Fixes - Fix a few small errors in the reference. - Fix paper cuts in the API docs. Fixes #24882 Fixes #25233 Fixes #25250
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index fe5a6d9be49..5a445bb42a6 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -653,9 +653,10 @@ There are several kinds of item: * [`use` declarations](#use-declarations) * [modules](#modules) * [functions](#functions) -* [type definitions](#type-definitions) +* [type aliases](#type-aliases) * [structures](#structures) * [enumerations](#enumerations) +* [constant items](#constant-items) * [static items](#static-items) * [traits](#traits) * [implementations](#implementations) @@ -672,16 +673,16 @@ which sub-item declarations may appear. ### Type Parameters -All items except modules may be *parameterized* by type. Type parameters are -given as a comma-separated list of identifiers enclosed in angle brackets -(`<...>`), after the name of the item and before its definition. The type -parameters of an item are considered "part of the name", not part of the type -of the item. A referencing [path](#paths) must (in principle) provide type -arguments as a list of comma-separated types enclosed within angle brackets, in -order to refer to the type-parameterized item. In practice, the type-inference -system can usually infer such argument types from context. There are no -general type-parametric types, only type-parametric items. That is, Rust has -no notion of type abstraction: there are no first-class "forall" types. +All items except modules, constants and statics may be *parameterized* by type. +Type parameters are given as a comma-separated list of identifiers enclosed in +angle brackets (`<...>`), after the name of the item and before its definition. +The type parameters of an item are considered "part of the name", not part of +the type of the item. A referencing [path](#paths) must (in principle) provide +type arguments as a list of comma-separated types enclosed within angle +brackets, in order to refer to the type-parameterized item. In practice, the +type-inference system can usually infer such argument types from context. There +are no general type-parametric types, only type-parametric items. That is, Rust +has no notion of type abstraction: there are no first-class "forall" types. ### Modules @@ -743,7 +744,7 @@ mod thread { } ``` -##### Extern crate declarations +#### Extern crate declarations An _`extern crate` declaration_ specifies a dependency on an external crate. The external crate is then bound into the declaring scope as the `ident` @@ -767,7 +768,7 @@ extern crate std; // equivalent to: extern crate std as std; extern crate std as ruststd; // linking to 'std' under another name ``` -##### Use declarations +#### Use declarations A _use declaration_ creates one or more local name bindings synonymous with some other [path](#paths). Usually a `use` declaration is used to shorten the |
