rust/tests/ui/const-generics/adt_const_params/116308.rs
2024-08-16 08:37:19 +08:00

19 lines
261 B
Rust

//@ check-pass
#![feature(adt_const_params)]
// Regression test for #116308
pub trait Identity {
type Identity;
}
impl<T> Identity for T {
type Identity = Self;
}
pub fn foo<const X: <i32 as Identity>::Identity>() {}
fn main() {
foo::<12>();
}