rust/tests/run-pass/strings.rs
Scott Olson f9c1cfa889 Remove now-useless #[miri_run] attributes.
Except for `ints.rs`, which is already handled by a pending pull request.
2016-06-17 22:52:30 -06:00

28 lines
526 B
Rust

fn empty() -> &'static str {
""
}
fn hello() -> &'static str {
"Hello, world!"
}
fn hello_bytes() -> &'static [u8; 13] {
b"Hello, world!"
}
fn hello_bytes_fat() -> &'static [u8] {
b"Hello, world!"
}
fn fat_pointer_on_32_bit() {
Some(5).expect("foo");
}
fn main() {
assert_eq!(empty(), "");
assert_eq!(hello(), "Hello, world!");
assert_eq!(hello_bytes(), b"Hello, world!");
assert_eq!(hello_bytes_fat(), b"Hello, world!");
fat_pointer_on_32_bit(); // Should run without crashing.
}