File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2222parameters are listed in angle <span class =" parenthetical " >brackets (` <...> ` )</span >,
2323usually immediately after the name of the item and before its definition. For
2424implementations, 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.
2626
2727Some examples of items with type, const, and lifetime parameters:
2828
@@ -31,7 +31,7 @@ fn foo<'a, T>() {}
3131trait A <U > {}
3232struct Ref <'a , T > where T : 'a { r : & 'a T }
3333struct InnerArray <T , const N : usize >([T ; N ]);
34- struct Uwu <const N : bool , U >(U );
34+ struct EitherOrderWorks <const N : bool , U >(U );
3535```
3636
3737Generic parameters are in scope within the item definition where they are
You can’t perform that action at this time.
0 commit comments