File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22
22
parameters are listed in angle <span class =" parenthetical " >brackets (` <...> ` )</span >,
23
23
usually immediately after the name of the item and before its definition. For
24
24
implementations, which don't have a name, they come directly after ` impl ` .
25
- The order of generic parameters is restricted to lifetime parameters and then type/ const parameters intermixed.
25
+ The order of generic parameters is restricted to lifetime parameters and then type and const parameters intermixed.
26
26
27
27
Some examples of items with type, const, and lifetime parameters:
28
28
@@ -31,7 +31,7 @@ fn foo<'a, T>() {}
31
31
trait A <U > {}
32
32
struct Ref <'a , T > where T : 'a { r : & 'a T }
33
33
struct InnerArray <T , const N : usize >([T ; N ]);
34
- struct Uwu <const N : bool , U >(U );
34
+ struct EitherOrderWorks <const N : bool , U >(U );
35
35
```
36
36
37
37
Generic parameters are in scope within the item definition where they are
You can’t perform that action at this time.
0 commit comments