Skip to content

Commit 6465748

Browse files
committed
Simplify the limitations on arguments and add explanation.
1 parent 92a5243 commit 6465748

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

text/0000-const-fn.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ Traits, trait implementations and their methods cannot be `const` - this
7575
allows us to properly design a constness/CTFE system that interacts well
7676
with traits - for more details, see *Alternatives*.
7777

78-
Only simple by-value immutable bindings are allowed as arguments' patterns.
78+
Only simple by-value bindings are allowed in arguments, e.g. `x: T`. While
79+
by-ref bindings and destructuring can be supported, they're not necessary
80+
and they would only complicate the implementation.
7981

8082
The body of the function is checked as if it were a block inside a `const`:
8183
```rust

0 commit comments

Comments
 (0)