rust/tests/ui/generic-const-items/inference-failure.rs
2023-07-28 22:23:20 +02:00

16 lines
281 B
Rust

#![feature(generic_const_items)]
#![allow(incomplete_features)]
const NONE<T>: Option<T> = None::<T>;
const IGNORE<T>: () = ();
fn none() {
let _ = NONE; //~ ERROR type annotations needed
}
fn ignore() {
let _ = IGNORE; //~ ERROR type annotations needed
}
fn main() {}