Closed michaeljklein closed 1 week ago
Generated at commit: e56f2c4cfb5c169a15358302d9d4dd0bf4cac948, compared to commit: 426f2955cbe4f086581d05eea7d06c47e0491195
For:
struct Foo<const N: usize> {
x: [u8; N],
}
fn main() {}
fn bar<const M: u32>() -> Foo<M> {
todo!()
}
Rust gives:
error: the constant `M` is not of type `usize`
--> t.rs:8:27
|
8 | fn bar<const M: u32>() -> Foo<M> {
| ^^^^^^ expected `usize`, found `u32`
|
note: required by a bound in `Foo`
--> t.rs:2:12
|
2 | struct Foo<const N: usize> {
| ^^^^^^^^^^^^^^ required by this bound in `Foo`
The original issue appears to be resolved by https://github.com/noir-lang/noir/pull/6083
Description
Problem*
Instead of printing:
We print:
Summary*
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.