23
23
Functions, type aliases, structs, enumerations, unions, traits and
24
24
implementations may be * parameterized* by types and lifetimes. These parameters
25
25
are listed in angle <span class =" parenthetical " >brackets (` <...> ` )</span >,
26
- usually immediattely after and before its definition the name of the item. For
26
+ usually immediately after and before its definition the name of the item. For
27
27
implementations, which don't have a name, they come directly after ` impl ` .
28
28
Lifetime parameters must be declared before type parameters. Some examples of
29
29
items with type and lifetime parameters:
@@ -36,7 +36,7 @@ struct Ref<'a, T> where T: 'a { r: &'a T }
36
36
37
37
[ References] , [ raw pointers] , [ arrays] , [ slices] [ arrays ] , [ tuples] and
38
38
[ function pointers] have lifetime or type parameters as well, but are not
39
- refered to with path syntax.
39
+ referred to with path syntax.
40
40
41
41
## Where clauses
42
42
@@ -61,8 +61,8 @@ refered to with path syntax.
61
61
parameters as well as a way to specify bounds on types that aren't type
62
62
parameters.
63
63
64
- Bounds that don't use the item's parameters are checked when the item is
65
- defined. It is an error for such a bound to be false.
64
+ Bounds that don't use the item's parameters or higher-ranked lifetimes are
65
+ checked when the item is defined. It is an error for such a bound to be false.
66
66
67
67
[ ` Copy ` ] , [ ` Clone ` ] and [ ` Sized ` ] bounds are also checked for certain generic
68
68
types when defining the item. It is an error to have ` Copy ` or ` Clone ` as a
0 commit comments