#![feature(const_generics, const_compare_raw_pointers)] //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash struct Checked bool>; 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::; //~ mismatched types let _ = Checked::; let _ = Checked::<{generic_arg::}>; let _ = Checked::<{generic_arg::}>; //~ mismatched types let _ = Checked::; //~ type annotations needed let _ = Checked::<{generic::}>; let _: Checked<{generic::}> = Checked::<{generic::}>; let _: Checked<{generic::}> = Checked::<{generic::}>; //~ mismatched types }