Merge inherent impl blocks for `Diverges
This commit is contained in:
parent
034a8fd1df
commit
d67528ff7d
@ -470,16 +470,6 @@ pub enum Diverges {
|
||||
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`.
|
||||
|
||||
impl ops::BitAnd for Diverges {
|
||||
@ -509,6 +499,14 @@ impl ops::BitOrAssign for 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 {
|
||||
// Enum comparison ignores the
|
||||
// contents of fields, so we just
|
||||
|
Loading…
Reference in New Issue
Block a user