]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tuple/tuple-index-out-of-bounds.rs
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
[rust.git] / src / test / ui / tuple / tuple-index-out-of-bounds.rs
1 struct Point(i32, i32);
2
3 fn main() {
4     let origin = Point(0, 0);
5     origin.0;
6     origin.1;
7     origin.2;
8     //~^ ERROR no field `2` on type `Point`
9     let tuple = (0, 0);
10     tuple.0;
11     tuple.1;
12     tuple.2;
13     //~^ ERROR no field `2` on type `({integer}, {integer})`
14 }