Skip to content

Commit b4c739d

Browse files
committedSep 18, 2016
Add missing Eq implementations
1 parent 8889703 commit b4c739d

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed
 

‎src/libcore/char.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ pub fn decode_utf8<I: IntoIterator<Item = u8>>(i: I) -> DecodeUtf8<I::IntoIter>
800800

801801
/// `<DecodeUtf8 as Iterator>::next` returns this for an invalid input sequence.
802802
#[unstable(feature = "decode_utf8", issue = "33906")]
803-
#[derive(PartialEq, Debug)]
803+
#[derive(PartialEq, Eq, Debug)]
804804
pub struct InvalidSequence(());
805805

806806
#[unstable(feature = "decode_utf8", issue = "33906")]

‎src/libcore/fmt/rt/v1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct FormatSpec {
3131
}
3232

3333
/// Possible alignments that can be requested as part of a formatting directive.
34-
#[derive(Copy, Clone, PartialEq)]
34+
#[derive(Copy, Clone, PartialEq, Eq)]
3535
pub enum Alignment {
3636
/// Indication that contents should be left-aligned.
3737
Left,

‎src/libcore/num/dec2flt/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ from_str_float_impl!(f64);
155155
/// [`FromStr`]: ../str/trait.FromStr.html
156156
/// [`f32`]: ../../std/primitive.f32.html
157157
/// [`f64`]: ../../std/primitive.f64.html
158-
#[derive(Debug, Clone, PartialEq)]
158+
#[derive(Debug, Clone, PartialEq, Eq)]
159159
#[stable(feature = "rust1", since = "1.0.0")]
160160
pub struct ParseFloatError {
161161
kind: FloatErrorKind
162162
}
163163

164-
#[derive(Debug, Clone, PartialEq)]
164+
#[derive(Debug, Clone, PartialEq, Eq)]
165165
enum FloatErrorKind {
166166
Empty,
167167
Invalid,

‎src/libcore/num/flt2dec/decoder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use num::dec2flt::rawfp::RawFloat;
2121
/// - Any number from `(mant - minus) * 2^exp` to `(mant + plus) * 2^exp` will
2222
/// round to the original value. The range is inclusive only when
2323
/// `inclusive` is true.
24-
#[derive(Copy, Clone, Debug, PartialEq)]
24+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
2525
pub struct Decoded {
2626
/// The scaled mantissa.
2727
pub mant: u64,
@@ -38,7 +38,7 @@ pub struct Decoded {
3838
}
3939

4040
/// Decoded unsigned value.
41-
#[derive(Copy, Clone, Debug, PartialEq)]
41+
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
4242
pub enum FullDecoded {
4343
/// Not-a-number.
4444
Nan,

‎src/libcore/num/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ impl usize {
24052405
/// assert_eq!(nan.classify(), FpCategory::Nan);
24062406
/// assert_eq!(sub.classify(), FpCategory::Subnormal);
24072407
/// ```
2408-
#[derive(Copy, Clone, PartialEq, Debug)]
2408+
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
24092409
#[stable(feature = "rust1", since = "1.0.0")]
24102410
pub enum FpCategory {
24112411
/// "Not a Number", often obtained by dividing by zero.
@@ -2748,11 +2748,11 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32)
27482748
/// on the primitive integer types, such as [`i8::from_str_radix()`].
27492749
///
27502750
/// [`i8::from_str_radix()`]: ../../std/primitive.i8.html#method.from_str_radix
2751-
#[derive(Debug, Clone, PartialEq)]
2751+
#[derive(Debug, Clone, PartialEq, Eq)]
27522752
#[stable(feature = "rust1", since = "1.0.0")]
27532753
pub struct ParseIntError { kind: IntErrorKind }
27542754

2755-
#[derive(Debug, Clone, PartialEq)]
2755+
#[derive(Debug, Clone, PartialEq, Eq)]
27562756
enum IntErrorKind {
27572757
Empty,
27582758
InvalidDigit,

‎src/libcore/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl FromStr for bool {
101101
}
102102

103103
/// An error returned when parsing a `bool` from a string fails.
104-
#[derive(Debug, Clone, PartialEq)]
104+
#[derive(Debug, Clone, PartialEq, Eq)]
105105
#[stable(feature = "rust1", since = "1.0.0")]
106106
pub struct ParseBoolError { _priv: () }
107107

‎src/libstd/ffi/c_str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,19 @@ pub struct CStr {
142142

143143
/// An error returned from `CString::new` to indicate that a nul byte was found
144144
/// in the vector provided.
145-
#[derive(Clone, PartialEq, Debug)]
145+
#[derive(Clone, PartialEq, Eq, Debug)]
146146
#[stable(feature = "rust1", since = "1.0.0")]
147147
pub struct NulError(usize, Vec<u8>);
148148

149149
/// An error returned from `CStr::from_bytes_with_nul` to indicate that a nul
150150
/// byte was found too early in the slice provided or one wasn't found at all.
151-
#[derive(Clone, PartialEq, Debug)]
151+
#[derive(Clone, PartialEq, Eq, Debug)]
152152
#[stable(feature = "cstr_from_bytes", since = "1.10.0")]
153153
pub struct FromBytesWithNulError { _a: () }
154154

155155
/// An error returned from `CString::into_string` to indicate that a UTF-8 error
156156
/// was encountered during the conversion.
157-
#[derive(Clone, PartialEq, Debug)]
157+
#[derive(Clone, PartialEq, Eq, Debug)]
158158
#[stable(feature = "cstring_into", since = "1.7.0")]
159159
pub struct IntoStringError {
160160
inner: CString,

‎src/libstd/net/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mod parser;
3838
///
3939
/// [`shutdown`]: struct.TcpStream.html#method.shutdown
4040
/// [`TcpStream`]: struct.TcpStream.html
41-
#[derive(Copy, Clone, PartialEq, Debug)]
41+
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
4242
#[stable(feature = "rust1", since = "1.0.0")]
4343
pub enum Shutdown {
4444
/// Indicates that the reading portion of this stream/socket should be shut

‎src/libstd/net/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl FromStr for SocketAddr {
370370

371371
/// An error returned when parsing an IP address or a socket address.
372372
#[stable(feature = "rust1", since = "1.0.0")]
373-
#[derive(Debug, Clone, PartialEq)]
373+
#[derive(Debug, Clone, PartialEq, Eq)]
374374
pub struct AddrParseError(());
375375

376376
#[stable(feature = "addr_parse_error_error", since = "1.4.0")]

‎src/libstd/sync/mpsc/select.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub struct Handle<'rx, T:Send+'rx> {
103103
struct Packets { cur: *mut Handle<'static, ()> }
104104

105105
#[doc(hidden)]
106-
#[derive(PartialEq)]
106+
#[derive(PartialEq, Eq)]
107107
pub enum StartResult {
108108
Installed,
109109
Abort,

0 commit comments

Comments
 (0)
Please sign in to comment.