@@ -653,9 +653,10 @@ There are several kinds of item:
653
653
* [ ` use ` declarations] ( #use-declarations )
654
654
* [ modules] ( #modules )
655
655
* [ functions] ( #functions )
656
- * [ type definitions ] ( #type-definitions )
656
+ * [ type aliases ] ( #type-aliases )
657
657
* [ structures] ( #structures )
658
658
* [ enumerations] ( #enumerations )
659
+ * [ constant items] ( #constant-items )
659
660
* [ static items] ( #static-items )
660
661
* [ traits] ( #traits )
661
662
* [ implementations] ( #implementations )
@@ -672,16 +673,16 @@ which sub-item declarations may appear.
672
673
673
674
### Type Parameters
674
675
675
- All items except modules may be * parameterized* by type. Type parameters are
676
- given as a comma-separated list of identifiers enclosed in angle brackets
677
- (` <...> ` ), after the name of the item and before its definition. The type
678
- parameters of an item are considered "part of the name", not part of the type
679
- of the item. A referencing [ path] ( #paths ) must (in principle) provide type
680
- arguments as a list of comma-separated types enclosed within angle brackets, in
681
- order to refer to the type-parameterized item. In practice, the type-inference
682
- system can usually infer such argument types from context. There are no
683
- general type-parametric types, only type-parametric items. That is, Rust has
684
- no notion of type abstraction: there are no first-class "forall" types.
676
+ All items except modules, constants and statics may be * parameterized* by type.
677
+ Type parameters are given as a comma-separated list of identifiers enclosed in
678
+ angle brackets (` <...> ` ), after the name of the item and before its definition.
679
+ The type parameters of an item are considered "part of the name", not part of
680
+ the type of the item. A referencing [ path] ( #paths ) must (in principle) provide
681
+ type arguments as a list of comma-separated types enclosed within angle
682
+ brackets, in order to refer to the type-parameterized item. In practice, the
683
+ type-inference system can usually infer such argument types from context. There
684
+ are no general type-parametric types, only type-parametric items. That is, Rust
685
+ has no notion of type abstraction: there are no first-class "forall" types.
685
686
686
687
### Modules
687
688
@@ -743,7 +744,7 @@ mod thread {
743
744
}
744
745
```
745
746
746
- ##### Extern crate declarations
747
+ #### Extern crate declarations
747
748
748
749
An _ ` extern crate ` declaration_ specifies a dependency on an external crate.
749
750
The external crate is then bound into the declaring scope as the ` ident `
@@ -768,7 +769,7 @@ extern crate std; // equivalent to: extern crate std as std;
768
769
extern crate std as ruststd; // linking to 'std' under another name
769
770
```
770
771
771
- ##### Use declarations
772
+ #### Use declarations
772
773
773
774
A _ use declaration_ creates one or more local name bindings synonymous with
774
775
some other [ path] ( #paths ) . Usually a ` use ` declaration is used to shorten the
0 commit comments