We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 003120a commit a928c83Copy full SHA for a928c83
src/test/run-pass/range_inclusive.rs
@@ -103,6 +103,14 @@ pub fn main() {
103
let mut narrow = 1...0;
104
assert_eq!(narrow.next_back(), None);
105
assert_eq!(narrow, RangeInclusive::Empty { at: 0 });
106
+ let mut zero = 0u8...0;
107
+ assert_eq!(zero.next_back(), Some(0));
108
+ assert_eq!(zero.next_back(), None);
109
+ assert_eq!(zero, RangeInclusive::Empty { at: 0 });
110
+ let mut high = 255u8...255;
111
+ assert_eq!(high.next_back(), Some(255));
112
+ assert_eq!(high.next_back(), None);
113
+ assert_eq!(high, RangeInclusive::Empty { at: 255 });
114
115
// what happens if you have a nonsense range?
116
let mut nonsense = 10...5;
0 commit comments