summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-29053.rs
blob: 34c4a0f8f3e48b40f5e1d63e0668a680fab4330d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// run-pass
fn main() {
    let x: &'static str = "x";

    {
        let y = "y".to_string();
        let ref mut x = &*x;
        *x = &*y;
    }

    assert_eq!(x, "x");
}