Merge inherent impl blocks for `Diverges

This commit is contained in:
Aaron Hill 2019-09-18 21:57:50 -04:00
parent 034a8fd1df
commit d67528ff7d
No known key found for this signature in database
GPG key ID: B4087E510E98B164

View file

@ -470,16 +470,6 @@ pub enum Diverges {
WarnedAlways WarnedAlways
} }
impl Diverges {
/// Creates a `Diverges::Always` with the provided `span` and the default note message.
fn always(span: Span) -> Diverges {
Diverges::Always {
span,
custom_note: None
}
}
}
// Convenience impls for combinig `Diverges`. // Convenience impls for combinig `Diverges`.
impl ops::BitAnd for Diverges { impl ops::BitAnd for Diverges {
@ -509,6 +499,14 @@ impl ops::BitOrAssign for Diverges {
} }
impl Diverges { impl Diverges {
/// Creates a `Diverges::Always` with the provided `span` and the default note message.
fn always(span: Span) -> Diverges {
Diverges::Always {
span,
custom_note: None
}
}
fn is_always(self) -> bool { fn is_always(self) -> bool {
// Enum comparison ignores the // Enum comparison ignores the
// contents of fields, so we just // contents of fields, so we just