Sign in
rust
/
rust-lang
/
rust
/
refs/heads/beta
/
.
/
tests
/
ui
/
borrowck
/
ref-mut-rebind-does-not-affect-outer.rs
blob: 6748442be13066494ff7ce4f6f5f2eecccb382b2 [
file
] [
edit
]
//! Regression test for https://github.com/rust-lang/rust/issues/29053
//@ 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"
);
}