Trait rustc::ty::layout::IntegerExt [−][src]
pub trait IntegerExt { fn to_ty<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
signed: bool
) -> Ty<'tcx>; fn from_attr<C: HasDataLayout>(cx: C, ity: IntType) -> Integer; fn repr_discr<'a, 'tcx>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,
repr: &ReprOptions,
min: i128,
max: i128
) -> (Integer, 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?
Required Methods
fn to_ty<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, signed: bool) -> 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?
fn from_attr<C: HasDataLayout>(cx: C, ity: IntType) -> Integer
🔬 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?
fn repr_discr<'a, 'tcx>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,
repr: &ReprOptions,
min: i128,
max: i128
) -> (Integer, bool)
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,
repr: &ReprOptions,
min: i128,
max: i128
) -> (Integer, 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?
Implementations on Foreign Types
impl IntegerExt for Integer
[src]
impl IntegerExt for Integer
fn to_ty<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, signed: bool) -> Ty<'tcx>
[src]
fn to_ty<'a, 'tcx>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, signed: bool) -> 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?
fn from_attr<C: HasDataLayout>(cx: C, ity: IntType) -> Integer
[src]
fn from_attr<C: HasDataLayout>(cx: C, ity: IntType) -> Integer
🔬 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?
Get the Integer type from an attr::IntType.
fn repr_discr<'a, 'tcx>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,
repr: &ReprOptions,
min: i128,
max: i128
) -> (Integer, bool)
[src]
fn repr_discr<'a, 'tcx>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
ty: Ty<'tcx>,
repr: &ReprOptions,
min: i128,
max: i128
) -> (Integer, 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?
Find the appropriate Integer type and signedness for the given signed discriminant range and #[repr] attribute. N.B.: u128 values above i128::MAX will be treated as signed, but that shouldn't affect anything, other than maybe debuginfo.