Sign in
◑
Theme
rust
/
rust
/
9dfdb6b4bc42e5f1ddd2d94108a8ea6fdf07d416
/
.
/
tests
/
ui
/
borrowck
/
pointer-reassignment-after-deref-78192.rs
blob: 99a1d37eb4de741fb4ccc6038bb850c31b724091 [
file
]
// https://github.com/rust-lang/rust/issues/78192
//@ run-pass
#![
allow
(
unused_assignments
)]
fn
main
()
{
let
a
=
1u32
;
let
b
=
2u32
;
let
mut
c
:
*
const
u32
=
&
a
;
let
d
:
&
u32
=
&
b
;
let
x
=
unsafe
{
&*
c
};
c
=
d
;
let
z
=
*
x
;
assert_eq
!(
1
,
z
);
}