Sign in
fuchsia
/
third_party
/
rust
/
cfcc5c296ed6fabcc8b9d380eaaea8a7352299fd
/
.
/
src
/
test
/
ui
/
on-unimplemented
/
slice-index.rs
blob: 758220d3c4ecd028fc9dfcf424094e6efe7b351e [
file
] [
log
] [
blame
]
// Test new Index error message for slices
use
std
::
ops
::
Index
;
fn
main
()
{
let
x
=
&[
1
,
2
,
3
]
as
&[
i32
];
x
[
1i32
];
//~ ERROR E0277
x
[..
1i32
];
//~ ERROR E0277
}