summary refs log tree commit diff
path: root/src/test/run-pass/range_inclusive_gate.rs
blob: 7f72bf5d32578c1719b55834bb243ac5dadb5e2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![allow(unused_comparisons)]
// Test that you only need the syntax gate if you don't mention the structs.
// (Obsoleted since both features are stabilized)

fn main() {
    let mut count = 0;
    for i in 0_usize..=10 {
        assert!(i >= 0 && i <= 10);
        count += i;
    }
    assert_eq!(count, 55);
}