mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
26 lines
555 B
Rust
26 lines
555 B
Rust
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() {}
|