Sign in
fuchsia
/
third_party
/
rust
/
780f95dd182b1a432159430add57e9ab7cb45dd6
/
.
/
tests
/
ui
/
consts
/
const_unsafe_unreachable.rs
blob: 2f52b48746f23d5695385d42c4efa49937dfb709 [
file
] [
log
] [
blame
]
//@ run-pass
const
unsafe
fn
foo
(
x
:
bool
)
->
bool
{
match
x
{
true
=>
true
,
false
=>
std
::
hint
::
unreachable_unchecked
(),
}
}
const
BAR
:
bool
=
unsafe
{
foo
(
true
)
};
fn
main
()
{
assert_eq
!(
BAR
,
true
);
}