2019-03-25 16:11:21 -07:00
|
|
|
struct X(i32,i32,i32);
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = X(1, 2, 3);
|
|
|
|
let b = a.1suffix;
|
2019-03-26 12:09:13 -07:00
|
|
|
//~^ ERROR suffixes on a tuple index are invalid
|
2019-03-25 16:11:21 -07:00
|
|
|
println!("{}", b);
|
2019-03-25 21:38:23 -07:00
|
|
|
let c = (1, 2, 3);
|
|
|
|
let d = c.1suffix;
|
2019-03-26 12:09:13 -07:00
|
|
|
//~^ ERROR suffixes on a tuple index are invalid
|
2019-03-25 21:38:23 -07:00
|
|
|
println!("{}", d);
|
2019-03-26 12:32:32 -07:00
|
|
|
let s = X { 0suffix: 0, 1: 1, 2: 2 };
|
|
|
|
//~^ ERROR suffixes on a tuple index are invalid
|
|
|
|
match s {
|
|
|
|
X { 0suffix: _, .. } => {}
|
|
|
|
//~^ ERROR suffixes on a tuple index are invalid
|
|
|
|
}
|
2019-03-25 16:11:21 -07:00
|
|
|
}
|