Skip to content

Commit eb0e9b6

Browse files
committed
Fix some grammar issues.
1 parent 5e676a7 commit eb0e9b6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/items/generics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
> &nbsp;&nbsp; ( _LifetimeParam_ `,` )<sup>\*</sup> _LifetimeParam_<sup>?</sup>
1313
>
1414
> _LifetimeParam_ :\
15-
> &nbsp;&nbsp; [_OuterAttribute_]<sup>?</sup> [LIFETIME_OR_LABEL] `:` [_LifetimeBounds_]<sup>?</sup>
15+
> &nbsp;&nbsp; [_OuterAttribute_]<sup>?</sup> [LIFETIME_OR_LABEL]&nbsp;( `:` [_LifetimeBounds_] )<sup>?</sup>
1616
>
1717
> _TypeParams_:\
18-
> &nbsp;&nbsp; ( _TypeParam_ `,` )<sup>\*</sup> _TypeParam_ <sup>?</sup>
18+
> &nbsp;&nbsp; ( _TypeParam_ `,` )<sup>\*</sup> _TypeParam_<sup>?</sup>
1919
>
2020
> _TypeParam_ :\
2121
> &nbsp;&nbsp; [_OuterAttribute_]<sup>?</sup> [IDENTIFIER] ( `:` [_TypeParamBounds_] )<sup>?</sup> ( `=` [_Type_] )<sup>?</sup>

src/items/traits.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
> _Trait_ :\
55
> &nbsp;&nbsp; `unsafe`<sup>?</sup> `trait` [IDENTIFIER]&nbsp;
66
> [_Generics_]<sup>?</sup>
7+
> ( `:` [_TypeParamBounds_]<sup>?</sup> )<sup>?</sup>
78
> [_WhereClause_]<sup>?</sup> `{`\
89
> &nbsp;&nbsp;&nbsp;&nbsp; _TraitItem_<sup>\*</sup>\
910
> &nbsp;&nbsp; `}`
@@ -40,10 +41,10 @@
4041
> &nbsp;&nbsp; ( [_Pattern_] `:` )<sup>?</sup> [_Type_]
4142
>
4243
> _TraitConst_ :\
43-
> &nbsp;&nbsp; `const` [IDENTIFIER] ( ( `:` [_Type_] ) ( `=` [_Expression_] )<sup>?</sup> )<sup>?</sup> `;`
44+
> &nbsp;&nbsp; `const` [IDENTIFIER] `:` [_Type_]&nbsp;( `=` [_Expression_] )<sup>?</sup> `;`
4445
>
4546
> _TraitType_ :\
46-
> &nbsp;&nbsp; `type` [IDENTIFIER] ( `:` [_TypeParamBounds_] )<sup>?</sup> `;`
47+
> &nbsp;&nbsp; `type` [IDENTIFIER] ( `:` [_TypeParamBounds_]<sup>?</sup> )<sup>?</sup> `;`
4748
4849
A _trait_ describes an abstract interface that types can implement. This
4950
interface consists of [associated items], which come in three varieties:

src/items/use-declarations.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **<sup>Syntax:</sup>**\
44
> _UseDeclaration_ :\
5-
> &nbsp;&nbsp; [_Visibility_]<sup>?</sup> `use` _UseTree_ `;`
5+
> &nbsp;&nbsp; `use` _UseTree_ `;`
66
>
77
> _UseTree_ :\
88
> &nbsp;&nbsp; &nbsp;&nbsp; ([_SimplePath_]<sup>?</sup> `::`)<sup>?</sup> `*`\
@@ -152,5 +152,4 @@ fn main() {}
152152
153153
[IDENTIFIER]: identifiers.html
154154
[_SimplePath_]: paths.html#simple-paths
155-
[_Visibility_]: visibility-and-privacy.html
156155
[path qualifiers]: paths.html#path-qualifiers

0 commit comments

Comments
 (0)