Skip to content

Commit 8c1a585

Browse files
committed
Reviews
1 parent 4b5878f commit 8c1a585

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/items/generics.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ r[items.generics.const.inferred.intro]
240240
The inferred const asks the compiler to infer the const argument if possible
241241
based on the surrounding information available.
242242

243+
```rust
244+
fn make_buf() -> [u8; 1024] {
245+
[0x1; _]
246+
}
247+
```
248+
243249
r[items.generics.const.inferred.constraint]
244250
It cannot be used in item signatures.
245251

src/paths.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ GenericArgsConst ->
6565
| LiteralExpression
6666
| `-` LiteralExpression
6767
| SimplePathSegment
68+
| InferredConst
6869
6970
GenericArgsBinding ->
7071
IDENTIFIER GenericArgs? `=` Type

0 commit comments

Comments
 (0)