about summary refs log tree commit diff
path: root/tests/ui/issues/issue-29053.rs
blob: 3b61dc1152214791016249132454db90212acee9 (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");
}