Sign in
rust
/
rust
/
7253b2ba610be3cfdfd391de9af8ec461a2dee27
/
.
/
tests
/
ui
/
pattern
/
manually-drop-dangling-ref.rs
blob: 439e06e4a10bb6e1bd5832c171956db95d1a8d61 [
file
]
use
std
::
mem
::{
ManuallyDrop
,
transmute
};
const
DATA
:
ManuallyDrop
<&
i32
>
=
unsafe
{
transmute
(
4
_usize
)
};
fn
main
()
{
if
let
DATA
=
DATA
{}
//~ERROR: cannot be used as pattern
}