Sign in
fuchsia
/
third_party
/
rust
/
20d43d03dd27568f609d621ce44673393e838892
/
.
/
src
/
test
/
ui
/
tuple
/
tuple-index-out-of-bounds.rs
blob: c772c0daa18ebf8a45b59fab34a2ae0f2df4034f [
file
] [
log
] [
blame
]
struct
Point
(
i32
,
i32
);
fn
main
()
{
let
origin
=
Point
(
0
,
0
);
origin
.
0
;
origin
.
1
;
origin
.
2
;
//~^ ERROR no field `2` on type `Point`
let
tuple
=
(
0
,
0
);
tuple
.
0
;
tuple
.
1
;
tuple
.
2
;
//~^ ERROR no field `2` on type `({integer}, {integer})`
}