Skip to main content

Feature

Struct Feature 

Source
pub struct Feature {
    pub name: &'static str,
    pub kind: Kind,
    pub gcc_version: &'static str,
    pub status: Status,
    pub signature: &'static str,
    pub answer: Answer,
    pub value: u32,
    pub used_by: &'static [&'static str],
    pub tests: &'static [&'static str],
    pub notes: &'static str,
}
Expand description

One row of the matrix.

Fields§

§name: &'static str

The spelling asked about, with no __ armour on it.

§kind: Kind

Which operator answers for it.

§gcc_version: &'static str

The GCC release that introduced it.

§status: Status

How far along it is.

§signature: &'static str

The type a builtin has, written as a C prototype without the name, or empty.

Empty for everything that is not a builtin, and for a builtin whose type depends on what it is handed: __builtin_constant_p takes anything, __builtin_add_overflow takes three types that have to agree, and the atomics are a family rather than a function. Those are decided where the arguments are, and a fixed type here would be a worse answer than none.

It is a string rather than a structure because size_t is a different type on two targets and this table has no target. The compiler reads it once per builtin it is asked for. The set of words it may use is fixed and build.rs checks it, so a typo fails this crate’s build rather than the compile of whoever first calls the builtin.

§answer: Answer

What to do when it is met and is not implemented.

§value: u32

What __has_c_attribute answers with, which the standard fixes per attribute. One for every other kind, where the operators answer one or nothing.

§used_by: &'static [&'static str]

Projects known to need it, from the corpus in spec/15-testing.md.

§tests: &'static [&'static str]

The tests that prove the status, named as crate::test or as a file path.

§notes: &'static str

Anything a reader needs that the fields above do not say.

Trait Implementations§

Source§

impl Clone for Feature

Source§

fn clone(&self) -> Feature

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Feature

Source§

impl Debug for Feature

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Feature

Source§

impl PartialEq for Feature

Source§

fn eq(&self, other: &Feature) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Feature

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.