blob: 84f953b1f8eab4f432f772d801025152938ece97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// run-pass
#![allow(non_camel_case_types)]
type an_int = isize;
fn cmp(x: Option<an_int>, y: Option<isize>) -> bool {
x == y
}
pub fn main() {
assert!(!cmp(Some(3), None));
assert!(!cmp(Some(3), Some(4)));
assert!(cmp(Some(3), Some(3)));
assert!(cmp(None, None));
}
|