Merge inherent impl blocks for `Diverges
This commit is contained in:
parent
034a8fd1df
commit
d67528ff7d
1 changed files with 8 additions and 10 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue