Skip to content

Commit 6ff62de

Browse files
committed
reviews
1 parent 82cedf5 commit 6ff62de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

posts/inside-rust/2025-03-07-inferred-const-generic-arguments.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn foo() {
1919
}
2020
```
2121

22-
This is entirely a syntactic limitation; writing `_` is disallowed but it is still possible to elide generic argument listings that may involve const arguments:
22+
This is entirely a syntactic limitation; it is possible to entirely elide generic argument listings that may involve const arguments:
2323
```rust
2424
fn foo<const N: usize>(_: [u8; N]) {}
2525

@@ -34,7 +34,7 @@ fn bar() {
3434

3535
The compiler has always been able to infer values for const generic parameters, only the ability to explicitly ask for a const argument to be inferred is unstable.
3636

37-
`feature(generic_arg_infer)` also allows you to infer the length of a repeat expression. This was previously not possible without moving the expression into a separate function generic over the array length.
37+
It is currently also not possible to the infer the length of a repeat expression. Doing so would require moving the expression into a separate function generic over the array length.
3838

3939
```rust
4040
fn foo() {
@@ -43,17 +43,17 @@ fn foo() {
4343
}
4444
```
4545

46-
This feature allows all of the previous examples to compile, which should hopefully feel like something that should "obviously" be supported by Rust.
46+
With `feature(generic_arg_infer)` all of the previous examples compile. This should hopefully feel like something that should "obviously" be supported by Rust.
4747

4848
## What comes next
4949

5050
We have [significantly reworked the implementation](https://github.com/rust-lang/rust/pull/135272) of this recently and it should now be ready for stabilization. We'd love for you to try it out on a recent nightly and report any issues you encounter.
5151

5252
## Acknowledgements
5353

54-
My recent push to make this feature ready for testing would not have been possible without the help of many others.
54+
My recent push to make this feature ready for testing would not have been possible without the help of many others:
5555

56-
[@lcnr][lcnr] and [@JulianKnodt][JulianKnodt] for the initial implementation of `generic_arg_infer`, [@camelid][camelid] for refactoring our representation of const geneic arguments to be more flexible, [@voidc][voidc] for helping unify the way we operate on array lengths and const generic arguments, [@lcnr][lcnr] for design work on abstracting away differences between inferred type/const/generic arguments, and finally [@compiler-errors][compiler-errors] for reviewing many PRs and implementation decisions made as part of work on this feature.
56+
A big thank you to [@lcnr][lcnr] and [@JulianKnodt][JulianKnodt] for the initial implementation of `generic_arg_infer`, [@camelid][camelid] for refactoring our representation of const generic arguments to be more flexible, [@voidc][voidc] for helping unify the way we operate on array lengths and const generic arguments, [@lcnr][lcnr] for design work on abstracting away differences between inferred type/const/generic arguments, and finally [@compiler-errors][compiler-errors] for reviewing many PRs and implementation decisions made as part of work on this feature.
5757

5858
[lcnr]: https://github.com/lcnr
5959
[JulianKnodt]: https://github.com/JulianKnodt

0 commit comments

Comments
 (0)