rust/src/test/run-pass/estr-uniq.rs

9 lines
179 B
Rust
Raw Normal View History

2012-04-03 18:11:59 -07:00
fn main() {
let x : str/~ = "hello"/~;
2012-04-16 16:17:51 -07:00
let _y : str/~ = "there"/~;
let mut z = "thing"/~;
z = x;
assert z[0] == ('h' as u8);
assert z[4] == ('o' as u8);
2012-04-03 18:11:59 -07:00
}