Skip to content

Commit bd714f6

Browse files
committed
update generic arg docs
1 parent 210191a commit bd714f6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/paths.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,26 @@ mod m {
5252
> &nbsp;&nbsp; &nbsp;&nbsp; `<` `>`\
5353
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,`<sup>?</sup> `>`\
5454
> &nbsp;&nbsp; | `<` _GenericArgsTypes_ `,`<sup>?</sup> `>`\
55+
> &nbsp;&nbsp; | `<` _GenericArgsConsts_ `,`<sup>?</sup> `>`\
5556
> &nbsp;&nbsp; | `<` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
56-
> &nbsp;&nbsp; | `<` _GenericArgsTypes_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
5757
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsTypes_ `,`<sup>?</sup> `>`\
58+
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsConsts_ `,`<sup>?</sup> `>`\
5859
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
59-
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsTypes_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`
60+
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsTypes_ `,` _GenericArgsConsts_ `,`<sup>?</sup> `>`\
61+
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsTypes_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
62+
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsConsts_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
63+
> &nbsp;&nbsp; | `<` _GenericArgsTypes_ `,` _GenericArgsConsts_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`\
64+
> &nbsp;&nbsp; | `<` _GenericArgsLifetimes_ `,` _GenericArgsTypes_ `,` _GenericArgsConsts_ `,` _GenericArgsBindings_ `,`<sup>?</sup> `>`
6065
>
6166
> _GenericArgsLifetimes_ :\
6267
> &nbsp;&nbsp; [_Lifetime_] (`,` [_Lifetime_])<sup>\*</sup>
6368
>
6469
> _GenericArgsTypes_ :\
6570
> &nbsp;&nbsp; [_Type_] (`,` [_Type_])<sup>\*</sup>
6671
>
72+
> _GenericArgsConsts_ :\
73+
> &nbsp;&nbsp; [_Expression_] (`,` [_Expression_])<sup>\*</sup>
74+
>
6775
> _GenericArgsBindings_ :\
6876
> &nbsp;&nbsp; _GenericArgsBinding_ (`,` _GenericArgsBinding_)<sup>\*</sup>
6977
>
@@ -81,6 +89,9 @@ ambiguity with the less-than operator. This is colloquially known as "turbofish"
8189
Vec::<u8>::with_capacity(1024);
8290
```
8391

92+
Const arguments must be surrounded by braces unless they are a
93+
[literal] or a single segment path.
94+
8495
## Qualified paths
8596

8697
> **<sup>Syntax</sup>**\
@@ -367,6 +378,8 @@ mod without { // ::without
367378
[_GenericArgs_]: #paths-in-expressions
368379
[_Lifetime_]: trait-bounds.md
369380
[_Type_]: types.md#type-expressions
381+
[_Expression_]: expressions.md
382+
[literal]: expressions/literal-expr.md
370383
[item]: items.md
371384
[variable]: variables.md
372385
[implementations]: items/implementations.md

0 commit comments

Comments
 (0)