Skip to content

Commit bb122e4

Browse files
committed
Specify no binding collisions being allowed in fn param lists
1 parent 496ef38 commit bb122e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/expressions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,6 +3587,9 @@ site of a :t:`call expression` or a :t:`method call expression`.
35873587
The :t:`pattern` of a :t:`closure parameter` shall be an
35883588
:t:`irrefutable pattern`.
35893589

3590+
:dp:`fls_qPeOL6ZhXsgH`
3591+
The :t:`[binding]s` of all :t:`[pattern]s` of all :t:`[closure parameter]s` of a :t:`closure expression` shall not shadow another.
3592+
35903593
:dp:`fls_yn30xuejcfxo`
35913594
The :t:`type` of a :t:`closure expression` is the unique anonymous
35923595
:t:`closure type` defined by it.

src/functions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ it is an :t:`external function`.
8383
The :t:`pattern` of a :t:`function parameter` shall be an :t:`irrefutable
8484
pattern`.
8585

86+
:dp:`fls_PGDKWK7nPvgw`
87+
The :t:`[binding]s` of all :t:`[pattern]s` of all :t:`[function parameter]s` of a :t:`function` shall not shadow another.
88+
8689
:dp:`fls_vljy4mm0zca2`
8790
A :t:`return type` is the :t:`type` of the result a :t:`function` returns.
8891

@@ -183,4 +186,3 @@ program. A :t:`main function` is subject to the following restrictions:
183186
}
184187
185188
fn main() {}
186-

0 commit comments

Comments
 (0)