rust/src/test/ui/range/range_traits-1.rs
Vadim Petrochenkov 642669c74d Update tests
2020-01-09 21:23:12 +03:00

49 lines
1.2 KiB
Rust

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