pub type StabilityUncomputed = Stability<AllowToggleUncomputed>;
Expand description
Stability
where allow_toggle
has not been computed yet.
Aliased Type§
enum StabilityUncomputed {
Stable {
allow_toggle: fn(_: &Target, _: bool) -> Result<(), &'static str>,
},
Unstable {
nightly_feature: Symbol,
allow_toggle: fn(_: &Target, _: bool) -> Result<(), &'static str>,
},
Forbidden {
reason: &'static str,
},
}
Variants§
Stable
This target feature is stable, it can be used in #[target_feature]
and
#[cfg(target_feature)]
.
Fields
Unstable
This target feature is unstable. It is only present in #[cfg(target_feature)]
on
nightly and using it in #[target_feature]
requires enabling the given nightly feature.
Fields
Forbidden
This feature can not be set via -Ctarget-feature
or #[target_feature]
, it can only be
set in the target spec. It is never set in cfg(target_feature)
. Used in
particular for features that change the floating-point ABI.
Implementations§
Source§impl StabilityUncomputed
impl StabilityUncomputed
pub fn compute_toggleability(&self, target: &Target) -> StabilityComputed
pub fn toggle_allowed( &self, target: &Target, enable: bool, ) -> Result<(), &'static str>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Stable
: 12 bytesUnstable
: 12 bytesForbidden
: 20 bytes