blob: 1d5dd8eca87e675d26678443a0cab2b611f5920c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//! Operations on unique pointer types
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
use cmp::{Eq, Ord};
impl<T:Eq> ~const T : Eq {
pure fn eq(other: &~const T) -> bool { *self == *(*other) }
pure fn ne(other: &~const T) -> bool { *self != *(*other) }
}
impl<T:Ord> ~const T : Ord {
pure fn lt(other: &~const T) -> bool { *self < *(*other) }
pure fn le(other: &~const T) -> bool { *self <= *(*other) }
pure fn ge(other: &~const T) -> bool { *self >= *(*other) }
pure fn gt(other: &~const T) -> bool { *self > *(*other) }
}
|