Open
Description
mod m {
pub const N: u32 = 0;
}
struct S<const X: u32>;
fn main() {
let _ = S::<m::N>; // error[E0573]: expected type, found constant `m::N`
}
There's no reason this couldn't be supported, but it's nontrivial to implement: we need to wait until type-checking to disambiguate between types and constants due to associated types (see this Zulip conversation).
This is essentially the same issue as #66615, but it's more visible (and affects min_const_generics
).