//@ revisions: full min #![cfg_attr(full, feature(adt_const_params))] #![cfg_attr(full, allow(incomplete_features))] struct Checked bool>; //~^ ERROR: using function pointers as const generic parameters fn not_one(val: usize) -> bool { val != 1 } fn not_two(val: usize) -> bool { val != 2 } fn generic_arg(val: T) -> bool { true } fn generic(val: usize) -> bool { val != 1 } fn main() { let _: Option> = None; let _: Checked = Checked::; let _: Checked = Checked::; let _ = Checked::; let _ = Checked::<{generic_arg::}>; let _ = Checked::<{generic_arg::}>; //~ ERROR: mismatched types let _ = Checked::; //~ ERROR: type annotations needed let _ = Checked::<{generic::}>; let _: Checked<{generic::}> = Checked::<{generic::}>; let _: Checked<{generic::}> = Checked::<{generic::}>; }