rust/tests/run-pass/heap.rs

19 lines
333 B
Rust
Raw Normal View History

2016-03-14 23:25:13 -06:00
#![feature(custom_attribute, box_syntax)]
2016-03-14 22:05:50 -06:00
#![allow(dead_code, unused_attributes)]
#[miri_run]
2016-03-14 23:25:13 -06:00
fn make_box() -> Box<(i16, i16)> {
Box::new((1, 2))
}
#[miri_run]
fn make_box_syntax() -> Box<(i16, i16)> {
box (1, 2)
2016-03-14 22:05:50 -06:00
}
2016-04-22 10:34:14 +02:00
2016-04-22 14:38:46 +02:00
#[miri_run]
fn main() {
assert_eq!(*make_box(), (1, 2));
assert_eq!(*make_box_syntax(), (1, 2));
}