Implement tuple and tuple struct indexing
This allows code to access the fields of tuples and tuple structs: let x = (1i, 2i); assert_eq!(x.1, 2); struct Point(int, int); let origin = Point(0, 0); assert_eq!(origin.0, 0); assert_eq!(origin.1, 0);
This commit is contained in:
parent
651106462c
commit
bf274bc18b
34 changed files with 549 additions and 14 deletions
|
@ -467,7 +467,8 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
ast::ExprCast(e, _) |
|
||||
ast::ExprUnary(_, e) |
|
||||
ast::ExprParen(e) |
|
||||
ast::ExprField(e, _, _) => {
|
||||
ast::ExprField(e, _, _) |
|
||||
ast::ExprTupField(e, _, _) => {
|
||||
self.straightline(expr, pred, [e])
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue