Skip to content

Commit b60fc5d

Browse files
author
Jonathan Turner
authored
Rollup merge of rust-lang#36423 - GuillaumeGomez:eq_impl, r=pnkfelix
Add missing Eq implementations Part of rust-lang#36301.
2 parents b474c82 + b4c739d commit b60fc5d

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
@@ -2401,7 +2401,7 @@ impl usize {
24012401
/// assert_eq!(nan.classify(), FpCategory::Nan);
24022402
/// assert_eq!(sub.classify(), FpCategory::Subnormal);
24032403
/// ```
2404-
#[derive(Copy, Clone, PartialEq, Debug)]
2404+
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
24052405
#[stable(feature = "rust1", since = "1.0.0")]
24062406
pub enum FpCategory {
24072407
/// "Not a Number", often obtained by dividing by zero.
@@ -2744,11 +2744,11 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32)
27442744
/// on the primitive integer types, such as [`i8::from_str_radix()`].
27452745
///
27462746
/// [`i8::from_str_radix()`]: ../../std/primitive.i8.html#method.from_str_radix
2747-
#[derive(Debug, Clone, PartialEq)]
2747+
#[derive(Debug, Clone, PartialEq, Eq)]
27482748
#[stable(feature = "rust1", since = "1.0.0")]
27492749
pub struct ParseIntError { kind: IntErrorKind }
27502750

2751-
#[derive(Debug, Clone, PartialEq)]
2751+
#[derive(Debug, Clone, PartialEq, Eq)]
27522752
enum IntErrorKind {
27532753
Empty,
27542754
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
@@ -146,19 +146,19 @@ pub struct CStr {
146146

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

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

159159
/// An error returned from `CString::into_string` to indicate that a UTF-8 error
160160
/// was encountered during the conversion.
161-
#[derive(Clone, PartialEq, Debug)]
161+
#[derive(Clone, PartialEq, Eq, Debug)]
162162
#[stable(feature = "cstring_into", since = "1.7.0")]
163163
pub struct IntoStringError {
164164
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)