summaryrefslogtreecommitdiffstats
path: root/tests/ui/range/range_traits-1.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/range/range_traits-1.rs')
-rw-r--r--tests/ui/range/range_traits-1.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/range/range_traits-1.rs b/tests/ui/range/range_traits-1.rs
new file mode 100644
index 000000000..e28e47435
--- /dev/null
+++ b/tests/ui/range/range_traits-1.rs
@@ -0,0 +1,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() {}