Skip to content

Commit a3de66c

Browse files
committed
Specify associated type bounds
1 parent 6b67f61 commit a3de66c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/generics.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,17 @@ Generic Arguments
311311

312312
GenericArgument ::=
313313
BindingArgument
314+
| BindingBoundArgument
314315
| ConstantArgument
315316
| LifetimeArgument
316317
| TypeArgument
317318
318319
BindingArgument ::=
319320
Identifier $$=$$ TypeSpecification
320321

322+
BindingBoundArgument ::=
323+
Identifier $$:$$ TypeBoundList
324+
321325
ConstantArgument ::=
322326
BlockExpression
323327
| $$-$$? LiteralExpression
@@ -349,6 +353,16 @@ A :s:`LifetimeArgument` shall precede :s:`[BindingArgument]s`,
349353
A :t:`binding argument` is a :t:`generic argument` that supplies the :t:`type`
350354
of an :t:`associated trait type`.
351355

356+
:dp:`fls_mcUMWsYcxzmZ`
357+
A :t:`binding bound argument` is a :t:`generic argument` that further imposes
358+
:t:`[bound]s` on an :t:`associated trait type`.
359+
360+
:dp:`fls_dxMfAI4EZVS5`
361+
A :t:`binding bound argument` shall only be used within the confines of a
362+
:t:`type bound predicate`'s :t:`[bound]s`, :t:`[impl trait type]`'s
363+
:t:`[bound]s`, :t:`associated type`'s :t:`[bound]s` or :t:`trait`'s
364+
:t:`[supertrait]s`.
365+
352366
:dp:`fls_i3z9ueoe99zd`
353367
A :t:`constant argument` is a :t:`generic argument` that supplies the
354368
:t:`value` of a :t:`constant parameter`.

src/glossary.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,15 @@ binding argument
699699
A :dt:`binding argument` is a :t:`generic argument` that supplies the :t:`type`
700700
of an :t:`associated trait type`.
701701

702+
.. _fls_t2cit5QOte8U:
703+
704+
binding bound argument
705+
^^^^^^^^^^^^^^^^^^^^^^
706+
707+
:dp:`fls_D3i3n4RIReCA`
708+
A :dt:`binding bound argument` is a :t:`generic argument` that further imposes
709+
:t:`[bound]s` on an :t:`associated trait type`.
710+
702711
.. _fls_bv1k866tai6j:
703712

704713
binding mode
@@ -4068,7 +4077,6 @@ main function signature
40684077
^^^^^^^^^^^^^^^^^^^^^^^
40694078

40704079
:dp:`fls_QijObGZEIykU`
4071-
40724080
A :dt:`main function signature` is a :t:`function signature` subject to specific
40734081
restrictions.
40744082

0 commit comments

Comments
 (0)