Enum rustc_typeck::check::Diverges [−][src]
pub enum Diverges {
Maybe,
Always,
WarnedAlways,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Tracks whether executing a node may exit normally (versus return/break/panic, which "diverge", leaving dead code in their wake). Tracked semi-automatically (through type variables marked as diverging), with some manual adjustments for control-flow primitives (approximating a CFG).
Variants
Maybe🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Potentially unknown, some cases converge, others require a CFG to determine them.
Always🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Definitely known to diverge and therefore not reach the next sibling or its parent.
WarnedAlways🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Same as Always but with a reachability
warning already emitted
Methods
impl Diverges[src]
impl Divergesfn always(self) -> bool[src]
fn always(self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl Copy for Diverges[src]
impl Copy for Divergesimpl Clone for Diverges[src]
impl Clone for Divergesfn clone(&self) -> Diverges[src]
fn clone(&self) -> DivergesReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Diverges[src]
impl Debug for Divergesfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Diverges[src]
impl PartialEq for Divergesfn eq(&self, other: &Diverges) -> bool[src]
fn eq(&self, other: &Diverges) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Diverges[src]
impl Eq for Divergesfn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl PartialOrd for Diverges[src]
impl PartialOrd for Divergesfn partial_cmp(&self, other: &Diverges) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Diverges) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Diverges[src]
impl Ord for Divergesfn cmp(&self, other: &Diverges) -> Ordering[src]
fn cmp(&self, other: &Diverges) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl BitAnd for Diverges[src]
impl BitAnd for Divergestype Output = Self
The resulting type after applying the & operator.
fn bitand(self, other: Self) -> Self[src]
fn bitand(self, other: Self) -> SelfPerforms the & operation.
impl BitOr for Diverges[src]
impl BitOr for Divergestype Output = Self
The resulting type after applying the | operator.
fn bitor(self, other: Self) -> Self[src]
fn bitor(self, other: Self) -> SelfPerforms the | operation.
impl BitAndAssign for Diverges[src]
impl BitAndAssign for Divergesfn bitand_assign(&mut self, other: Self)[src]
fn bitand_assign(&mut self, other: Self)Performs the &= operation.
impl BitOrAssign for Diverges[src]
impl BitOrAssign for Divergesfn bitor_assign(&mut self, other: Self)[src]
fn bitor_assign(&mut self, other: Self)Performs the |= operation.