rust/tests/run-pass/strings.rs

30 lines
422 B
Rust
Raw Normal View History

2016-03-19 00:19:39 -05:00
#![feature(custom_attribute)]
#![allow(dead_code, unused_attributes)]
#[miri_run]
fn empty() -> &'static str {
""
}
#[miri_run]
fn hello() -> &'static str {
"Hello, world!"
}
2016-03-19 00:20:59 -05:00
#[miri_run]
fn hello_bytes() -> &'static [u8; 13] {
b"Hello, world!"
}
2016-03-21 19:51:25 -05:00
#[miri_run]
fn hello_bytes_fat() -> &'static [u8] {
b"Hello, world!"
}
2016-04-22 03:34:14 -05:00
2016-05-31 05:05:25 -05:00
#[miri_run]
fn fat_pointer_on_32_bit() {
Some(5).expect("foo");
}
2016-04-22 03:34:14 -05:00
fn main() {}