rust/tests/ui/tuple/nested-index.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
217 B
Rust
Raw Normal View History

2020-03-26 02:17:41 -05:00
// run-pass
fn main () {
let n = (1, (2, 3)).1.1;
assert_eq!(n, 3);
2020-03-26 02:57:39 -05:00
let n = (1, (2, (3, 4))).1.1.1;
assert_eq!(n, 4);
// This is a range expression, not nested indexing.
let _ = 0.0..1.1;
2020-03-26 02:17:41 -05:00
}