Sign in
fuchsia
/
third_party
/
rust
/
5b7d64e9473216dc8650ca5f910100389ab91726
/
.
/
src
/
test
/
ui
/
consts
/
const-eval
/
conditional_array_execution.rs
blob: 96f67c92a5e93f02f977e7888405a951f2ef4312 [
file
] [
log
] [
blame
]
// build-fail
#![
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
}