Closed
Description
Code
#![feature(generic_const_exprs)]
fn bb<const N: bool>() {}
fn b<const N: bool>() {
bb::<{!N}>();
}
fn main() {}
Current output
help: try adding a `where` bound using this expression: `where [(); {!N}]:`
Desired output
`where [(); !N as usize]:`
Rationale and extra context
The well-formedness shouldn't be written as where [(); {!N}]:
when !N
is a bool, which doesn't compile. Should cast it to an integral type.
Other cases
No response
Rust Version
1.78.0-nightly (2024-03-11 4a0cc881dcc4d800f106)
Anything else?
No response