]> git.proxmox.com Git - rustc.git/blob - tests/ui/tuple/tuple-index-out-of-bounds.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }