blob: 729ae535ceff69a67b83477e2c0cf441ada945e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// check-fail
#![feature(const_option)]
const FOO: i32 = Some(42i32).unwrap();
const BAR: i32 = Option::<i32>::None.unwrap();
//~^ERROR: evaluation of constant value failed
fn main() {
println!("{}", FOO);
println!("{}", BAR);
}
|