rust/src/test/ui/range_inclusive_gate.rs
2019-07-27 18:56:16 +03:00

15 lines
325 B
Rust

// run-pass
#![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);
}