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