summaryrefslogtreecommitdiffstats
path: root/tests/ui/range/range_traits-1.rs
blob: e28e47435c2c2fa999be8b7eabec626e9f8cb160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use std::ops::*;

#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
struct AllTheRanges {
    a: Range<usize>,
    //~^ ERROR can't compare
    //~| ERROR Ord
    b: RangeTo<usize>,
    //~^ ERROR can't compare
    //~| ERROR Ord
    c: RangeFrom<usize>,
    //~^ ERROR can't compare
    //~| ERROR Ord
    d: RangeFull,
    //~^ ERROR can't compare
    //~| ERROR Ord
    e: RangeInclusive<usize>,
    //~^ ERROR can't compare
    //~| ERROR Ord
    f: RangeToInclusive<usize>,
    //~^ ERROR can't compare
    //~| ERROR Ord
}

fn main() {}