summary refs log tree commit diff
path: root/src/test/ui/consts/const-option.rs
blob: fbf20b9db67415434e49cdb1313922b870846efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass

#![feature(const_option)]

const X: Option<i32> = Some(32);
const Y: Option<&i32> = X.as_ref();

const IS_SOME: bool = X.is_some();
const IS_NONE: bool = Y.is_none();

fn main() {
    assert!(IS_SOME);
    assert!(!IS_NONE)
}