Skip to content

Commit d6f4cc4

Browse files
committed
Rename grammar rule TypeParamBounds to just Bounds
1 parent 581920f commit d6f4cc4

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/items/generics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ GenericParam -> OuterAttribute* ( LifetimeParam | TypeParam | ConstParam )
99
1010
LifetimeParam -> Lifetime ( `:` LifetimeBounds )?
1111
12-
TypeParam -> IDENTIFIER ( `:` TypeParamBounds? )? ( `=` Type )?
12+
TypeParam -> IDENTIFIER ( `:` Bounds? )? ( `=` Type )?
1313
1414
ConstParam ->
1515
`const` IDENTIFIER `:` Type
@@ -236,7 +236,7 @@ WhereClauseItem ->
236236
237237
LifetimeWhereClauseItem -> Lifetime `:` LifetimeBounds
238238
239-
TypeBoundWhereClauseItem -> ForLifetimes? Type `:` TypeParamBounds?
239+
TypeBoundWhereClauseItem -> ForLifetimes? Type `:` Bounds?
240240
```
241241

242242
r[items.generics.where.intro]

src/items/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ r[items.traits]
44
r[items.traits.syntax]
55
```grammar,items
66
Trait ->
7-
`unsafe`? `trait` IDENTIFIER GenericParams? ( `:` TypeParamBounds? )? WhereClause?
7+
`unsafe`? `trait` IDENTIFIER GenericParams? ( `:` Bounds? )? WhereClause?
88
`{`
99
InnerAttribute*
1010
AssociatedItem*

src/items/type-aliases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ r[items.type]
44
r[items.type.syntax]
55
```grammar,items
66
TypeAlias ->
7-
`type` IDENTIFIER GenericParams? ( `:` TypeParamBounds )?
7+
`type` IDENTIFIER GenericParams? ( `:` Bounds )?
88
WhereClause?
99
( `=` Type WhereClause?)? `;`
1010
```
@@ -33,13 +33,13 @@ let _ = TypeAlias(5); // Doesn't work
3333
```
3434

3535
r[items.type.associated-type]
36-
A type alias, when not used as an [associated type], must include a [Type][grammar-Type] and may not include [TypeParamBounds].
36+
A type alias, when not used as an [associated type], must include a [Type][grammar-Type] and may not include [Bounds].
3737

3838
r[items.type.associated-trait]
39-
A type alias, when used as an [associated type] in a [trait], must not include a [Type][grammar-Type] specification but may include [TypeParamBounds].
39+
A type alias, when used as an [associated type] in a [trait], must not include a [Type][grammar-Type] specification but may include [Bounds].
4040

4141
r[items.type.associated-impl]
42-
A type alias, when used as an [associated type] in a [trait impl], must include a [Type][grammar-Type] specification and may not include [TypeParamBounds].
42+
A type alias, when used as an [associated type] in a [trait impl], must include a [Type][grammar-Type] specification and may not include [Bounds].
4343

4444
r[items.type.deprecated]
4545
Where clauses before the equals sign on a type alias in a [trait impl] (like `type TypeAlias<T> where T: Foo = Bar<T>`) are deprecated. Where clauses after the equals sign (like `type TypeAlias<T> = Bar<T> where T: Foo`) are preferred.

src/paths.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ GenericArgsBinding ->
6868
IDENTIFIER GenericArgs? `=` Type
6969
7070
GenericArgsBounds ->
71-
IDENTIFIER GenericArgs? `:` TypeParamBounds
71+
IDENTIFIER GenericArgs? `:` Bounds
7272
```
7373

7474
r[paths.expr.intro]
@@ -162,7 +162,7 @@ TypePathFnInputs -> Type (`,` Type)* `,`?
162162
```
163163

164164
r[paths.type.intro]
165-
Type paths are used within type definitions, trait bounds, type parameter bounds, and qualified paths.
165+
Type paths are used within type definitions, trait bounds, and qualified paths.
166166

167167
r[paths.type.turbofish]
168168
Although the `::` token is allowed before the generics arguments, it is not required because there is no ambiguity like there is in [PathInExpression].

src/trait-bounds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ r[bound]
33

44
r[bound.syntax]
55
```grammar,miscellaneous
6-
TypeParamBounds -> TypeParamBound ( `+` TypeParamBound )* `+`?
6+
Bounds -> Bound ( `+` Bound )* `+`?
77
8-
TypeParamBound -> Lifetime | TraitBound | UseBound
8+
Bound -> Lifetime | TraitBound | UseBound
99
1010
TraitBound ->
1111
( `?` | ForLifetimes )? TypePath

src/types/impl-trait.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ r[type.impl-trait]
33

44
r[type.impl-trait.syntax]
55
```grammar,types
6-
ImplTraitType -> `impl` TypeParamBounds
6+
ImplTraitType -> `impl` Bounds
77
88
ImplTraitTypeOneBound -> `impl` TraitBound
99
```

src/types/trait-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ r[type.trait-object]
33

44
r[type.trait-object.syntax]
55
```grammar,types
6-
TraitObjectType -> `dyn`? TypeParamBounds
6+
TraitObjectType -> `dyn`? Bounds
77
88
TraitObjectTypeOneBound -> `dyn`? TraitBound
99
```

0 commit comments

Comments
 (0)