Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
mir
/
issue-74739.rs
blob: 06d210e01033a2c04aa2d15cf38bd4ee08b4edca [
file
] [
log
] [
blame
] [
edit
]
//@ compile-flags: -O
//@ run-pass
struct
Foo
{
x
:
i32
,
}
pub
fn
main
()
{
let
mut
foo
=
Foo
{
x
:
42
};
let
x
=
&
mut
foo
.
x
;
*
x
=
13
;
let
y
=
foo
;
assert_eq
!(
y
.
x
,
13
);
// used to print 42 due to mir-opt bug
}