1
Fork 0

Rollup merge of #36423 - GuillaumeGomez:eq_impl, r=pnkfelix

Add missing Eq implementations

Part of #36301.
This commit is contained in:
Jonathan Turner 2016-09-22 11:25:01 -07:00 committed by GitHub
commit b60fc5d16a
10 changed files with 16 additions and 16 deletions

View file

@ -800,7 +800,7 @@ pub fn decode_utf8<I: IntoIterator<Item = u8>>(i: I) -> DecodeUtf8<I::IntoIter>
/// `<DecodeUtf8 as Iterator>::next` returns this for an invalid input sequence. /// `<DecodeUtf8 as Iterator>::next` returns this for an invalid input sequence.
#[unstable(feature = "decode_utf8", issue = "33906")] #[unstable(feature = "decode_utf8", issue = "33906")]
#[derive(PartialEq, Debug)] #[derive(PartialEq, Eq, Debug)]
pub struct InvalidSequence(()); pub struct InvalidSequence(());
#[unstable(feature = "decode_utf8", issue = "33906")] #[unstable(feature = "decode_utf8", issue = "33906")]

View file

@ -31,7 +31,7 @@ pub struct FormatSpec {
} }
/// Possible alignments that can be requested as part of a formatting directive. /// Possible alignments that can be requested as part of a formatting directive.
#[derive(Copy, Clone, PartialEq)] #[derive(Copy, Clone, PartialEq, Eq)]
pub enum Alignment { pub enum Alignment {
/// Indication that contents should be left-aligned. /// Indication that contents should be left-aligned.
Left, Left,

View file

@ -155,13 +155,13 @@ from_str_float_impl!(f64);
/// [`FromStr`]: ../str/trait.FromStr.html /// [`FromStr`]: ../str/trait.FromStr.html
/// [`f32`]: ../../std/primitive.f32.html /// [`f32`]: ../../std/primitive.f32.html
/// [`f64`]: ../../std/primitive.f64.html /// [`f64`]: ../../std/primitive.f64.html
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseFloatError { pub struct ParseFloatError {
kind: FloatErrorKind kind: FloatErrorKind
} }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
enum FloatErrorKind { enum FloatErrorKind {
Empty, Empty,
Invalid, Invalid,

View file

@ -21,7 +21,7 @@ use num::dec2flt::rawfp::RawFloat;
/// - Any number from `(mant - minus) * 2^exp` to `(mant + plus) * 2^exp` will /// - Any number from `(mant - minus) * 2^exp` to `(mant + plus) * 2^exp` will
/// round to the original value. The range is inclusive only when /// round to the original value. The range is inclusive only when
/// `inclusive` is true. /// `inclusive` is true.
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Decoded { pub struct Decoded {
/// The scaled mantissa. /// The scaled mantissa.
pub mant: u64, pub mant: u64,
@ -38,7 +38,7 @@ pub struct Decoded {
} }
/// Decoded unsigned value. /// Decoded unsigned value.
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum FullDecoded { pub enum FullDecoded {
/// Not-a-number. /// Not-a-number.
Nan, Nan,

View file

@ -2401,7 +2401,7 @@ impl usize {
/// assert_eq!(nan.classify(), FpCategory::Nan); /// assert_eq!(nan.classify(), FpCategory::Nan);
/// assert_eq!(sub.classify(), FpCategory::Subnormal); /// assert_eq!(sub.classify(), FpCategory::Subnormal);
/// ``` /// ```
#[derive(Copy, Clone, PartialEq, Debug)] #[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub enum FpCategory { pub enum FpCategory {
/// "Not a Number", often obtained by dividing by zero. /// "Not a Number", often obtained by dividing by zero.
@ -2744,11 +2744,11 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32)
/// on the primitive integer types, such as [`i8::from_str_radix()`]. /// on the primitive integer types, such as [`i8::from_str_radix()`].
/// ///
/// [`i8::from_str_radix()`]: ../../std/primitive.i8.html#method.from_str_radix /// [`i8::from_str_radix()`]: ../../std/primitive.i8.html#method.from_str_radix
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseIntError { kind: IntErrorKind } pub struct ParseIntError { kind: IntErrorKind }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
enum IntErrorKind { enum IntErrorKind {
Empty, Empty,
InvalidDigit, InvalidDigit,

View file

@ -101,7 +101,7 @@ impl FromStr for bool {
} }
/// An error returned when parsing a `bool` from a string fails. /// An error returned when parsing a `bool` from a string fails.
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct ParseBoolError { _priv: () } pub struct ParseBoolError { _priv: () }

View file

@ -146,19 +146,19 @@ pub struct CStr {
/// An error returned from `CString::new` to indicate that a nul byte was found /// An error returned from `CString::new` to indicate that a nul byte was found
/// in the vector provided. /// in the vector provided.
#[derive(Clone, PartialEq, Debug)] #[derive(Clone, PartialEq, Eq, Debug)]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct NulError(usize, Vec<u8>); pub struct NulError(usize, Vec<u8>);
/// An error returned from `CStr::from_bytes_with_nul` to indicate that a nul /// An error returned from `CStr::from_bytes_with_nul` to indicate that a nul
/// byte was found too early in the slice provided or one wasn't found at all. /// byte was found too early in the slice provided or one wasn't found at all.
#[derive(Clone, PartialEq, Debug)] #[derive(Clone, PartialEq, Eq, Debug)]
#[stable(feature = "cstr_from_bytes", since = "1.10.0")] #[stable(feature = "cstr_from_bytes", since = "1.10.0")]
pub struct FromBytesWithNulError { _a: () } pub struct FromBytesWithNulError { _a: () }
/// An error returned from `CString::into_string` to indicate that a UTF-8 error /// An error returned from `CString::into_string` to indicate that a UTF-8 error
/// was encountered during the conversion. /// was encountered during the conversion.
#[derive(Clone, PartialEq, Debug)] #[derive(Clone, PartialEq, Eq, Debug)]
#[stable(feature = "cstring_into", since = "1.7.0")] #[stable(feature = "cstring_into", since = "1.7.0")]
pub struct IntoStringError { pub struct IntoStringError {
inner: CString, inner: CString,

View file

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

View file

@ -370,7 +370,7 @@ impl FromStr for SocketAddr {
/// An error returned when parsing an IP address or a socket address. /// An error returned when parsing an IP address or a socket address.
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub struct AddrParseError(()); pub struct AddrParseError(());
#[stable(feature = "addr_parse_error_error", since = "1.4.0")] #[stable(feature = "addr_parse_error_error", since = "1.4.0")]

View file

@ -103,7 +103,7 @@ pub struct Handle<'rx, T:Send+'rx> {
struct Packets { cur: *mut Handle<'static, ()> } struct Packets { cur: *mut Handle<'static, ()> }
#[doc(hidden)] #[doc(hidden)]
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum StartResult { pub enum StartResult {
Installed, Installed,
Abort, Abort,