Closed
Description
Given the following code: here
struct Add<const N1: usize, const N2: usize>;
impl<const N1: usize, const N2: usize> Foo<N1, N2> {
const SUM: usize = N1 + N2;
}
fn foo() -> [(); Add<10, 12>::SUM] {
todo!()
}
The current output is:
error: expected one of `.`, `?`, `]`, or an operator, found `,`
--> src/lib.rs:5:24
|
5 | fn foo() -> [(); Add<10, 12>::SUM] {
| ^ expected one of `.`, `?`, `]`, or an operator
error: aborting due to previous error
error: could not compile `playground`
Ideally the output should mention that the user needs to use a turbofish here:
Add::<10, 12>::SUM
cc @lcnr