Sign in
rust
/
rust-lang
/
rust
/
HEAD
/
.
/
src
/
tools
/
miri
/
tests
/
fail
/
erroneous_const2.rs
blob: ea98b64ad814e906d99757355599e65552372b16 [
file
] [
log
] [
blame
]
const
X
:
u32
=
5
;
const
Y
:
u32
=
6
;
const
FOO
:
u32
=
[
X
-
Y
,
Y
-
X
][(
X
<
Y
)
as
usize
];
//~^ERROR: overflow
#[
rustfmt
::
skip
]
// rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn
main
()
{
println
!(
"{}"
,
FOO
);
}