Sign in
fuchsia
/
third_party
/
rust
/
6070e2e87616d8b2ae9ea58c800a79be936b9aab
/
.
/
src
/
test
/
ui
/
consts
/
const-eval
/
conditional_array_execution.rs
blob: 12e51c24605f82f18772472bf528fd2bbefc854a [
file
] [
log
] [
blame
]
#![
warn
(
const_err
)]
const
X
:
u32
=
5
;
const
Y
:
u32
=
6
;
const
FOO
:
u32
=
[
X
-
Y
,
Y
-
X
][(
X
<
Y
)
as
usize
];
//~^ WARN any use of this value will cause an error
fn
main
()
{
println
!(
"{}"
,
FOO
);
//~^ ERROR
}