summary refs log tree commit diff
path: root/src/test/ui/str-concat.rs
blob: fa2fc97d7b8a34812121a8a12ab8d062af44cc1d (plain)
1
2
3
4
5
6
7
8
9
// run-pass

pub fn main() {
    let a: String = "hello".to_string();
    let b: String = "world".to_string();
    let s: String = format!("{}{}", a, b);
    println!("{}", s.clone());
    assert_eq!(s.as_bytes()[9], 'd' as u8);
}