]> git.lizzy.rs Git - rust.git/blob - src/test/ui/range/range-1.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / test / ui / range / range-1.rs
1 // Test range syntax - type errors.
2
3 pub fn main() {
4     // Mixed types.
5     let _ = 0u32..10i32;
6     //~^ ERROR mismatched types
7
8     // Bool => does not implement iterator.
9     for i in false..true {}
10     //~^ ERROR `bool: Step` is not satisfied
11
12     // Unsized type.
13     let arr: &[_] = &[1, 2, 3];
14     let range = *arr..;
15     //~^ ERROR the size for values of type
16 }