Skip to main content

has_feature

Function has_feature 

Source
pub fn has_feature(name: &str) -> bool
Expand description

Whether __has_feature(name) / __has_extension(name) answers yes.

Clang’s vocabulary, answered for what this crate really has: c_thread_local, blocks and nested_functions are deliberately absent, because the constructs behind them are diagnosed rather than translated — a nested function definition is refused where it stands, in the parser, so a program that guards one with #if __has_extension(nested_functions) takes the other branch and never reaches the diagnostic. c_atomic is not absent any more: _Atomic and <stdatomic.h> are here.