rust/tests/run-pass/strings.rs
Oliver Schneider 12c2e5fab2
4byte pointers
2016-06-01 11:10:43 +02:00

30 lines
422 B
Rust

#![feature(custom_attribute)]
#![allow(dead_code, unused_attributes)]
#[miri_run]
fn empty() -> &'static str {
""
}
#[miri_run]
fn hello() -> &'static str {
"Hello, world!"
}
#[miri_run]
fn hello_bytes() -> &'static [u8; 13] {
b"Hello, world!"
}
#[miri_run]
fn hello_bytes_fat() -> &'static [u8] {
b"Hello, world!"
}
#[miri_run]
fn fat_pointer_on_32_bit() {
Some(5).expect("foo");
}
fn main() {}