rust/tests/ui/generic-const-items/inference-failure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
281 B
Rust
Raw Normal View History

2023-07-09 20:10:03 -05:00
#![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() {}