rust/test/sums.rs

31 lines
502 B
Rust
Raw Normal View History

2016-03-12 21:32:24 -06:00
#![feature(custom_attribute)]
#![allow(dead_code, unused_attributes)]
#[miri_run]
fn return_none() -> Option<i64> {
None
}
2016-03-12 21:32:24 -06:00
#[miri_run]
fn return_some() -> Option<i64> {
Some(42)
}
// #[miri_run]
// fn match_opt_none() -> i64 {
// let x = None,
2016-03-12 21:32:24 -06:00
// match x {
// Some(data) => data,
// None => 42,
2016-03-12 21:32:24 -06:00
// }
// }
// #[miri_run]
// fn match_opt_some() -> i64 {
// let x = Some(13);
2016-03-12 21:32:24 -06:00
// match x {
// Some(data) => data,
// None => 42,
2016-03-12 21:32:24 -06:00
// }
// }