rust/tests/ui/range/range_traits-1.rs

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

26 lines
555 B
Rust
Raw Normal View History

2016-06-09 15:32:43 -04:00
use std::ops::*;
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
struct AllTheRanges {
a: Range<usize>,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
b: RangeTo<usize>,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
c: RangeFrom<usize>,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
d: RangeFull,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
e: RangeInclusive<usize>,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
f: RangeToInclusive<usize>,
//~^ ERROR can't compare
//~| ERROR Ord
2016-06-09 15:32:43 -04:00
}
fn main() {}