1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// revisions: rpass #![feature(generic_const_exprs)] #![allow(incomplete_features)] struct Z; const fn one() -> usize { 1 } fn from_a_to_b<T>(source: [u8; one()]) -> T { todo!() } fn not_main() { let _: &Z = from_a_to_b([0; 1]); } fn main() {}