summary refs log tree commit diff
path: root/src/test/ui/issues/issue-53348.rs
blob: 65f4656b0226629ddddf7017d4c85c5a322a4436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn main() {
    let mut v = vec!["hello", "this", "is", "a", "test"];

    let v2 = Vec::new();

    v.into_iter().map(|s|s.to_owned()).collect::<Vec<_>>();

    let mut a = String::new();
    for i in v {
        a = *i.to_string();
        //~^ ERROR mismatched types
        //~| NOTE expected struct `String`, found `str`
        v2.push(a);
    }
}