2024-03-29 18:21:25 -05:00
|
|
|
//@ known-bug: #119701
|
2024-10-30 13:03:44 -05:00
|
|
|
#![feature(const_trait_impl, generic_const_exprs)]
|
2024-03-29 18:21:25 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = process::<()>([()]);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn process<T: const Trait>() -> [(); T::make(2)] {
|
|
|
|
input
|
|
|
|
}
|
|
|
|
|
|
|
|
#[const_trait]
|
|
|
|
trait Trait {
|
|
|
|
fn make(input: u8) -> usize;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl const Trait for () {
|
|
|
|
fn make(input: usize) -> usize {
|
|
|
|
input / 2
|
|
|
|
}
|
|
|
|
}
|