blob: 6b2607a997b4fcdd7fd0971761706bab860f5daa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#![allow(unused_assignments)]
#![allow(unknown_lints)]
#![allow(dead_assignment)]
pub fn main() {
let x : String = "hello".to_string();
let _y : String = "there".to_string();
let mut z = "thing".to_string();
z = x;
assert_eq!(z.as_bytes()[0], ('h' as u8));
assert_eq!(z.as_bytes()[4], ('o' as u8));
}
|