]> git.lizzy.rs Git - rust.git/blob - src/test/ui/tuple/tuple-index-out-of-bounds.rs
Merge commit '6f50986667debbfc67776304a8ee23fe0158613f' into libgccjit-codegen
[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 }