Struct rustc_ap_rustc_feature::Features [−][src]
pub struct Features {}Show fields
pub declared_lang_features: Vec<(Symbol, Span, Option<Symbol>)>, pub declared_lib_features: Vec<(Symbol, Span)>, pub rustc_attrs: bool, pub rustc_private: bool, pub intrinsics: bool, pub lang_items: bool, pub staged_api: bool, pub allow_internal_unstable: bool, pub allow_internal_unsafe: bool, pub link_llvm_intrinsics: bool, pub box_syntax: bool, pub start: bool, pub fundamental: bool, pub unboxed_closures: bool, pub linkage: bool, pub box_patterns: bool, pub prelude_import: bool, pub omit_gdb_pretty_printer_section: bool, pub abi_vectorcall: bool, pub structural_match: bool, pub dropck_eyepatch: bool, pub panic_runtime: bool, pub needs_panic_runtime: bool, pub compiler_builtins: bool, pub abi_unadjusted: bool, pub profiler_runtime: bool, pub abi_thiscall: bool, pub allocator_internals: bool, pub test_2018_feature: bool, pub no_niche: bool, pub rustc_allow_const_fn_unstable: bool, pub auto_traits: bool, pub doc_notable_trait: bool, pub arm_target_feature: bool, pub aarch64_target_feature: bool, pub hexagon_target_feature: bool, pub powerpc_target_feature: bool, pub mips_target_feature: bool, pub avx512_target_feature: bool, pub sse4a_target_feature: bool, pub tbm_target_feature: bool, pub wasm_target_feature: bool, pub adx_target_feature: bool, pub cmpxchg16b_target_feature: bool, pub movbe_target_feature: bool, pub rtm_target_feature: bool, pub f16c_target_feature: bool, pub riscv_target_feature: bool, pub ermsb_target_feature: bool, pub plugin_registrar: bool, pub plugin: bool, pub thread_local: bool, pub simd_ffi: bool, pub nll: bool, pub const_fn: bool, pub associated_type_defaults: bool, pub no_core: bool, pub default_type_parameter_fallback: bool, pub repr_simd: bool, pub platform_intrinsics: bool, pub unwind_attributes: bool, pub stmt_expr_attributes: bool, pub type_ascription: bool, pub cfg_target_thread_local: bool, pub specialization: bool, pub min_specialization: bool, pub naked_functions: bool, pub cfg_target_has_atomic: bool, pub exclusive_range_pattern: bool, pub never_type: bool, pub exhaustive_patterns: bool, pub untagged_unions: bool, pub link_cfg: bool, pub abi_ptx: bool, pub repr128: bool, pub static_nobundle: bool, pub abi_msp430_interrupt: bool, pub decl_macro: bool, pub abi_x86_interrupt: bool, pub allow_fail: bool, pub unsized_tuple_coercion: bool, pub generators: bool, pub doc_cfg: bool, pub doc_masked: bool, pub external_doc: bool, pub crate_visibility_modifier: bool, pub extern_types: bool, pub arbitrary_self_types: bool, pub in_band_lifetimes: bool, pub generic_associated_types: bool, pub trait_alias: bool, pub infer_static_outlives_requirements: bool, pub const_fn_union: bool, pub const_raw_ptr_to_usize_cast: bool, pub const_raw_ptr_deref: bool, pub trivial_bounds: bool, pub label_break_value: bool, pub doc_keyword: bool, pub try_blocks: bool, pub alloc_error_handler: bool, pub abi_amdgpu_kernel: bool, pub const_panic: bool, pub marker_trait_attr: bool, pub proc_macro_hygiene: bool, pub unsized_locals: bool, pub custom_test_frameworks: bool, pub custom_inner_attributes: bool, pub impl_trait_in_bindings: bool, pub lint_reasons: bool, pub precise_pointer_size_matching: bool, pub ffi_returns_twice: bool, pub const_generics: bool, pub optimize_attribute: bool, pub c_variadic: bool, pub associated_type_bounds: bool, pub let_chains: bool, pub transparent_unions: bool, pub arbitrary_enum_discriminant: bool, pub member_constraints: bool, pub async_closure: bool, pub type_alias_impl_trait: bool, pub const_extern_fn: bool, pub raw_dylib: bool, pub object_safe_for_dispatch: bool, pub abi_efiapi: bool, pub raw_ref_op: bool, pub never_type_fallback: bool, pub register_attr: bool, pub register_tool: bool, pub cfg_sanitize: bool, pub half_open_range_patterns: bool, pub const_mut_refs: bool, pub bindings_after_at: bool, pub const_trait_impl: bool, pub const_trait_bound_opt_out: bool, pub no_sanitize: bool, pub const_eval_limit: bool, pub negative_impls: bool, pub target_feature_11: bool, pub cfg_version: bool, pub ffi_pure: bool, pub ffi_const: bool, pub abi_avr_interrupt: bool, pub const_precise_live_drops: bool, pub format_args_capture: bool, pub lazy_normalization_consts: bool, pub const_fn_transmute: bool, pub if_let_guard: bool, pub const_evaluatable_checked: bool, pub const_fn_floating_point_arithmetic: bool, pub const_fn_fn_ptr_basics: bool, pub cmse_nonsecure_entry: bool, pub default_alloc_error_handler: bool, pub const_impl_trait: bool, pub isa_attribute: bool, pub inline_const: bool, pub unsized_fn_params: bool, pub destructuring_assignment: bool, pub cfg_panic: bool, pub capture_disjoint_fields: bool, pub extended_key_value_attributes: bool, pub const_generics_defaults: bool, pub const_refs_to_cell: bool, pub intra_doc_pointers: bool, pub abi_c_cmse_nonsecure_call: bool, pub relaxed_struct_unsize: bool, pub macro_attributes_in_derive_output: bool, pub min_type_alias_impl_trait: bool, pub inherent_associated_types: bool, pub large_assignments: bool, pub c_unwind: bool, pub fn_align: bool, pub wasm_abi: bool, pub no_coverage: bool, pub const_fn_trait_bound: bool, pub const_fn_unsize: bool, pub imported_main: bool, pub native_link_modifiers: bool, pub native_link_modifiers_bundle: bool, pub native_link_modifiers_verbatim: bool, pub native_link_modifiers_whole_archive: bool, pub native_link_modifiers_as_needed: bool,
Expand description
A set of features to be used by later passes.
Fields
declared_lang_features: Vec<(Symbol, Span, Option<Symbol>)>
Expand description
#![feature]
attrs for language features, for error reporting.
declared_lib_features: Vec<(Symbol, Span)>
Expand description
#![feature]
attrs for non-language (library) features.
rustc_attrs: bool
Expand description
Allows using rustc_*
attributes (RFC 572).
rustc_private: bool
Expand description
Allows using compiler’s own crates.
intrinsics: bool
Expand description
Allows using the rust-intrinsic
’s “ABI”.
lang_items: bool
Expand description
Allows using #[lang = ".."]
attribute for linking items to special compiler logic.
staged_api: bool
Expand description
Allows using the #[stable]
and #[unstable]
attributes.
allow_internal_unstable: bool
Expand description
Allows using #[allow_internal_unstable]
. This is an
attribute on macro_rules!
and can’t use the attribute handling
below (it has to be checked before expansion possibly makes
macros disappear).
allow_internal_unsafe: bool
Expand description
Allows using #[allow_internal_unsafe]
. This is an
attribute on macro_rules!
and can’t use the attribute handling
below (it has to be checked before expansion possibly makes
macros disappear).
link_llvm_intrinsics: bool
Expand description
no-tracking-issue-end
Allows using #[link_name="llvm.*"]
.
box_syntax: bool
Expand description
Allows using the box $expr
syntax.
start: bool
Expand description
Allows using #[start]
on a function indicating that it is the program entrypoint.
fundamental: bool
Expand description
Allows using the #[fundamental]
attribute.
unboxed_closures: bool
Expand description
Allows using the rust-call
ABI.
linkage: bool
Expand description
Allows using the #[linkage = ".."]
attribute.
box_patterns: bool
Expand description
Allows using box
in patterns (RFC 469).
prelude_import: bool
Expand description
Allows using #[prelude_import]
on glob use
items.
omit_gdb_pretty_printer_section: bool
Expand description
Allows using #[omit_gdb_pretty_printer_section]
.
abi_vectorcall: bool
Expand description
Allows using the vectorcall
ABI.
structural_match: bool
Expand description
Allows using #[structural_match]
which indicates that a type is structurally matchable.
FIXME: Subsumed by trait StructuralPartialEq
, cannot move to removed until a library
feature with the same name exists.
dropck_eyepatch: bool
Expand description
Allows using the may_dangle
attribute (RFC 1327).
panic_runtime: bool
Expand description
Allows using the #![panic_runtime]
attribute.
needs_panic_runtime: bool
Expand description
Allows declaring with #![needs_panic_runtime]
that a panic runtime is needed.
compiler_builtins: bool
Expand description
Allows identifying the compiler_builtins
crate.
abi_unadjusted: bool
Expand description
Allows using the unadjusted
ABI; perma-unstable.
profiler_runtime: bool
Expand description
Used to identify crates that contain the profiler runtime.
abi_thiscall: bool
Expand description
Allows using the thiscall
ABI.
allocator_internals: bool
Expand description
Allows using #![needs_allocator]
, an implementation detail of #[global_allocator]
.
test_2018_feature: bool
Expand description
Added for testing E0705; perma-unstable.
no_niche: bool
Expand description
Allows #[repr(no_niche)]
(an implementation detail of rustc
,
it is not on path for eventual stabilization).
rustc_allow_const_fn_unstable: bool
Expand description
Allows using #[rustc_allow_const_fn_unstable]
.
This is an attribute on const fn
for the same
purpose as #[allow_internal_unstable]
.
auto_traits: bool
Expand description
Allows features specific to auto traits.
Renamed from optin_builtin_traits
.
doc_notable_trait: bool
Expand description
Allows #[doc(notable_trait)]
.
Renamed from doc_spotlight
.
arm_target_feature: bool
aarch64_target_feature: bool
hexagon_target_feature: bool
powerpc_target_feature: bool
mips_target_feature: bool
avx512_target_feature: bool
sse4a_target_feature: bool
tbm_target_feature: bool
wasm_target_feature: bool
adx_target_feature: bool
cmpxchg16b_target_feature: bool
movbe_target_feature: bool
rtm_target_feature: bool
f16c_target_feature: bool
riscv_target_feature: bool
ermsb_target_feature: bool
plugin_registrar: bool
Expand description
Allows using #[plugin_registrar]
on functions.
plugin: bool
Expand description
Allows using #![plugin(myplugin)]
.
thread_local: bool
Expand description
Allows using #[thread_local]
on static
items.
simd_ffi: bool
Expand description
Allows the use of SIMD types in functions declared in extern
blocks.
nll: bool
Expand description
Allows using non lexical lifetimes (RFC 2094).
const_fn: bool
Expand description
Allows the definition of const
functions with some advanced features.
associated_type_defaults: bool
Expand description
Allows associated type defaults.
no_core: bool
Expand description
Allows #![no_core]
.
default_type_parameter_fallback: bool
Expand description
Allows default type parameters to influence type inference.
repr_simd: bool
Expand description
Allows repr(simd)
and importing the various simd intrinsics.
platform_intrinsics: bool
Expand description
Allows extern "platform-intrinsic" { ... }
.
unwind_attributes: bool
Expand description
Allows #[unwind(..)]
.
Permits specifying whether a function should permit unwinding or abort on unwind.
stmt_expr_attributes: bool
Expand description
Allows attributes on expressions and non-item statements.
type_ascription: bool
Expand description
Allows the use of type ascription in expressions.
cfg_target_thread_local: bool
Expand description
Allows cfg(target_thread_local)
.
specialization: bool
Expand description
Allows specialization of implementations (RFC 1210).
min_specialization: bool
Expand description
A minimal, sound subset of specialization intended to be used by the standard library until the soundness issues with specialization are fixed.
naked_functions: bool
Expand description
Allows using #[naked]
on functions.
cfg_target_has_atomic: bool
Expand description
Allows cfg(target_has_atomic = "...")
.
exclusive_range_pattern: bool
Expand description
Allows X..Y
patterns.
never_type: bool
Expand description
Allows the !
type. Does not imply ‘exhaustive_patterns’ (below) any more.
exhaustive_patterns: bool
Expand description
Allows exhaustive pattern matching on types that contain uninhabited types.
untagged_unions: bool
Expand description
Allows union
s to implement Drop
. Moreover, union
s may now include fields
that don’t implement Copy
as long as they don’t have any drop glue.
This is checked recursively. On encountering type variable where no progress can be made,
T: Copy
is used as a substitute for “no drop glue”.
NOTE: A limited form of union U { ... }
was accepted in 1.19.0.
link_cfg: bool
Expand description
Allows #[link(..., cfg(..))]
.
abi_ptx: bool
Expand description
Allows extern "ptx-*" fn()
.
repr128: bool
Expand description
Allows the #[repr(i128)]
attribute for enums.
static_nobundle: bool
Expand description
Allows #[link(kind="static-nobundle"...)]
.
abi_msp430_interrupt: bool
Expand description
Allows extern "msp430-interrupt" fn()
.
decl_macro: bool
Expand description
Allows declarative macros 2.0 (macro
).
abi_x86_interrupt: bool
Expand description
Allows extern "x86-interrupt" fn()
.
allow_fail: bool
Expand description
Allows a test to fail without failing the whole suite.
unsized_tuple_coercion: bool
Expand description
Allows unsized tuple coercion.
generators: bool
Expand description
Allows defining generators.
doc_cfg: bool
Expand description
Allows #[doc(cfg(...))]
.
doc_masked: bool
Expand description
Allows #[doc(masked)]
.
external_doc: bool
Expand description
Allows #[doc(include = "some-file")]
.
crate_visibility_modifier: bool
Expand description
Allows using crate
as visibility modifier, synonymous with pub(crate)
.
extern_types: bool
Expand description
Allows defining extern type
s.
arbitrary_self_types: bool
Expand description
Allows trait methods with arbitrary self types.
in_band_lifetimes: bool
Expand description
Allows in-band quantification of lifetime bindings (e.g., fn foo(x: &'a u8) -> &'a u8
).
generic_associated_types: bool
Expand description
Allows associated types to be generic, e.g., type Foo<T>;
(RFC 1598).
trait_alias: bool
Expand description
Allows defining trait X = A + B;
alias items.
infer_static_outlives_requirements: bool
Expand description
Allows inferring 'static
outlives requirements (RFC 2093).
const_fn_union: bool
Expand description
Allows accessing fields of unions inside const
functions.
const_raw_ptr_to_usize_cast: bool
Expand description
Allows casting raw pointers to usize
during const eval.
const_raw_ptr_deref: bool
Expand description
Allows dereferencing raw pointers during const eval.
trivial_bounds: bool
Expand description
Allows inconsistent bounds in where clauses.
label_break_value: bool
Expand description
Allows 'a: { break 'a; }
.
doc_keyword: bool
Expand description
Allows using #[doc(keyword = "...")]
.
try_blocks: bool
Expand description
Allows using try {...}
expressions.
alloc_error_handler: bool
Expand description
Allows defining an #[alloc_error_handler]
.
abi_amdgpu_kernel: bool
Expand description
Allows using the amdgpu-kernel
ABI.
const_panic: bool
Expand description
Allows panicking during const eval (producing compile-time errors).
marker_trait_attr: bool
Expand description
Allows #[marker]
on certain traits allowing overlapping implementations.
proc_macro_hygiene: bool
Expand description
Allows macro attributes on expressions, statements and non-inline modules.
unsized_locals: bool
Expand description
Allows unsized rvalues at arguments and parameters.
custom_test_frameworks: bool
Expand description
Allows custom test frameworks with #![test_runner]
and #[test_case]
.
custom_inner_attributes: bool
Expand description
Allows non-builtin attributes in inner attribute position.
impl_trait_in_bindings: bool
Expand description
Allows impl Trait
in bindings (let
, const
, static
).
lint_reasons: bool
Expand description
Allows using reason
in lint attributes and the #[expect(lint)]
lint check.
precise_pointer_size_matching: bool
Expand description
Allows exhaustive integer pattern matching on usize
and isize
.
ffi_returns_twice: bool
Expand description
Allows using #[ffi_returns_twice]
on foreign functions.
const_generics: bool
Expand description
Allows const generic types (e.g. struct Foo<const N: usize>(...);
).
optimize_attribute: bool
Expand description
Allows using #[optimize(X)]
.
c_variadic: bool
Expand description
Allows using C-variadics.
associated_type_bounds: bool
Expand description
Allows the user of associated type bounds.
let_chains: bool
Expand description
Allows if/while p && let q = r && ...
chains.
transparent_unions: bool
Expand description
Allows #[repr(transparent)] on unions (RFC 2645).
arbitrary_enum_discriminant: bool
Expand description
Allows explicit discriminants on non-unit enum variants.
member_constraints: bool
Expand description
Allows impl Trait
with multiple unrelated lifetimes.
async_closure: bool
Expand description
Allows async || body
closures.
type_alias_impl_trait: bool
Expand description
Allows impl Trait
to be used inside type aliases (RFC 2515).
const_extern_fn: bool
Expand description
Allows the definition of const extern fn
and const unsafe extern fn
.
raw_dylib: bool
Expand description
Allows the use of raw-dylibs (RFC 2627).
object_safe_for_dispatch: bool
Expand description
Allows making dyn Trait
well-formed even if Trait
is not object safe.
In that case, dyn Trait: Trait
does not hold. Moreover, coercions and
casts in safe Rust to dyn Trait
for such a Trait
is also forbidden.
abi_efiapi: bool
Expand description
Allows using the efiapi
ABI.
raw_ref_op: bool
Expand description
Allows &raw const $place_expr
and &raw mut $place_expr
expressions.
never_type_fallback: bool
Expand description
Allows diverging expressions to fall back to !
rather than ()
.
register_attr: bool
Expand description
Allows using the #[register_attr]
attribute.
register_tool: bool
Expand description
Allows using the #[register_tool]
attribute.
cfg_sanitize: bool
Expand description
Allows the use of #[cfg(sanitize = "option")]
; set when -Zsanitizer is used.
half_open_range_patterns: bool
Expand description
Allows using ..X
, ..=X
, ...X
, and X..
as a pattern.
const_mut_refs: bool
Expand description
Allows using &mut
in constant functions.
bindings_after_at: bool
Expand description
Allows bindings in the subpattern of a binding pattern.
For example, you can write x @ Some(y)
.
const_trait_impl: bool
Expand description
Allows impl const Trait for T
syntax.
const_trait_bound_opt_out: bool
Expand description
Allows T: ?const Trait
syntax in bounds.
no_sanitize: bool
Expand description
Allows the use of no_sanitize
attribute.
const_eval_limit: bool
negative_impls: bool
Expand description
Allow negative trait implementations.
target_feature_11: bool
Expand description
Allows the use of #[target_feature]
on safe functions.
cfg_version: bool
Expand description
Allow conditional compilation depending on rust version
ffi_pure: bool
Expand description
Allows the use of #[ffi_pure]
on foreign functions.
ffi_const: bool
Expand description
Allows the use of #[ffi_const]
on foreign functions.
abi_avr_interrupt: bool
Expand description
Allows extern "avr-interrupt" fn()
and extern "avr-non-blocking-interrupt" fn()
.
const_precise_live_drops: bool
Expand description
Be more precise when looking for live drops in a const context.
format_args_capture: bool
Expand description
Allows capturing variables in scope using format_args!
lazy_normalization_consts: bool
Expand description
Lazily evaluate constants. This allows constants to depend on type parameters.
const_fn_transmute: bool
Expand description
Allows calling transmute
in const fn
if_let_guard: bool
Expand description
Allows if let
guard in match arms.
const_evaluatable_checked: bool
Expand description
Allows non-trivial generic constants which have to be manually propagated upwards.
const_fn_floating_point_arithmetic: bool
Expand description
Allows basic arithmetic on floating point types in a const fn
.
const_fn_fn_ptr_basics: bool
Expand description
Allows using and casting function pointers in a const fn
.
cmse_nonsecure_entry: bool
Expand description
Allows to use the #[cmse_nonsecure_entry]
attribute.
default_alloc_error_handler: bool
Expand description
Allows rustc to inject a default alloc_error_handler
const_impl_trait: bool
Expand description
Allows argument and return position impl Trait
in a const fn
.
isa_attribute: bool
Expand description
Allows #[instruction_set(_)]
attribute
inline_const: bool
Expand description
Allow anonymous constants from an inline const
block
unsized_fn_params: bool
Expand description
Allows unsized fn parameters.
destructuring_assignment: bool
Expand description
Allows the use of destructuring assignments.
cfg_panic: bool
Expand description
Enables #[cfg(panic = "...")]
config key.
capture_disjoint_fields: bool
Expand description
Allows capturing disjoint fields in a closure/generator (RFC 2229).
extended_key_value_attributes: bool
Expand description
Allows arbitrary expressions in key-value attributes at parse time.
const_generics_defaults: bool
Expand description
Allows const generics to have default values (e.g. struct Foo<const N: usize = 3>(...);
).
const_refs_to_cell: bool
Expand description
Allows references to types with interior mutability within constants
intra_doc_pointers: bool
Expand description
Allows using pointer
and reference
in intra-doc links
abi_c_cmse_nonsecure_call: bool
Expand description
Allows extern "C-cmse-nonsecure-call" fn()
.
relaxed_struct_unsize: bool
Expand description
Lessens the requirements for structs to implement Unsize
.
macro_attributes_in_derive_output: bool
Expand description
Allows macro attributes to observe output of #[derive]
.
min_type_alias_impl_trait: bool
Expand description
Allows the use of type alias impl trait in function return positions
inherent_associated_types: bool
Expand description
Allows associated types in inherent impls.
large_assignments: bool
c_unwind: bool
Expand description
Allows extern "C-unwind" fn
to enable unwinding across ABI boundaries.
fn_align: bool
Expand description
Allows using #[repr(align(...))]
on function items
wasm_abi: bool
Expand description
Allows extern "wasm" fn
no_coverage: bool
Expand description
Allows function attribute #[no_coverage]
, to bypass coverage
instrumentation of that function.
const_fn_trait_bound: bool
Expand description
Allows trait bounds in const fn
.
const_fn_unsize: bool
Expand description
Allows unsizing coercions in const fn
.
imported_main: bool
Expand description
Allows using imported main
function
native_link_modifiers: bool
Expand description
Allows specifying modifiers in the link attribute: #[link(modifiers = "...")]
native_link_modifiers_bundle: bool
Expand description
Allows specifying the bundle link modifier
native_link_modifiers_verbatim: bool
Expand description
Allows specifying the verbatim link modifier
native_link_modifiers_whole_archive: bool
Expand description
Allows specifying the whole-archive link modifier
native_link_modifiers_as_needed: bool
Expand description
Allows specifying the as-needed link modifier
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Features
impl !Send for Features
impl !Sync for Features
impl Unpin for Features
impl UnwindSafe for Features
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,