summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/format-borrow.rs
blob: 599a79fc08af46d9922128d10f5e24a08c3d1b90 (plain)
1
2
3
4
5
6
7
8
9
10
fn main() {
    let a: String = &String::from("a");
    //~^ ERROR mismatched types
    let b: String = &format!("b");
    //~^ ERROR mismatched types
    let c: String = &mut format!("c");
    //~^ ERROR mismatched types
    let d: String = &mut (format!("d"));
    //~^ ERROR mismatched types
}