Struct rustc::ty::util::Discr [−][src]
🔬 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?
Fields
val: u128
🔬 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?
bit representation of the discriminant, so -128i8
is 0xFF_u128
ty: Ty<'tcx>
🔬 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?
Methods
impl<'tcx> Discr<'tcx>
[src]
impl<'tcx> Discr<'tcx>
pub fn wrap_incr<'a, 'gcx>(self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Self
[src]
pub fn wrap_incr<'a, 'gcx>(self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Self
🔬 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?
Adds 1 to the value and wraps around if the maximum for the type is reached
pub fn checked_add<'a, 'gcx>(
self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
n: u128
) -> (Self, bool)
[src]
pub fn checked_add<'a, 'gcx>(
self,
tcx: TyCtxt<'a, 'gcx, 'tcx>,
n: u128
) -> (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<'tcx> Copy for Discr<'tcx>
[src]
impl<'tcx> Copy for Discr<'tcx>
impl<'tcx> Clone for Discr<'tcx>
[src]
impl<'tcx> Clone for Discr<'tcx>
fn clone(&self) -> Discr<'tcx>
[src]
fn clone(&self) -> Discr<'tcx>
Returns 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<'tcx> Debug for Discr<'tcx>
[src]
impl<'tcx> Debug for Discr<'tcx>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'tcx> Display for Discr<'tcx>
[src]
impl<'tcx> Display for Discr<'tcx>