rustc/tests/ui/feature-gates/feature-gate-min-generic-const-args.rs
2025-01-11 15:57:26 +01:00

12 lines
275 B
Rust

trait Trait {
const ASSOC: usize;
}
// FIXME(min_generic_const_args): implement support for this, behind the feature gate
fn foo<T: Trait>() -> [u8; <T as Trait>::ASSOC] {
//~^ ERROR generic parameters may not be used in const operations
loop {}
}
fn main() {}