1 2 3 4 5 6 7 8 9 10 11 12 13
// check-pass // (this requires debug assertions) #![feature(adt_const_params)] #![allow(incomplete_features)] fn foo<const B: &'static bool>(arg: &'static bool) -> bool { B == arg } fn main() { foo::<{ &true }>(&false); }