[][src]Module syntax::attr

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Functions dealing with attributes and meta items.

Re-exports

pub use IntType::*;
pub use ReprAttr::*;
pub use StabilityLevel::*;
pub use crate::ast::Attribute;

Modules

builtinInternal

Parsing and validation of builtin attributes

Structs

AttributeTemplateInternal

A template that the attribute input must match. Only top-level shape (#[attr] vs #[attr(...)] vs #[attr = ...]) is considered now.

DeprecationInternal
RustcDeprecationInternal
StabilityInternal

Represents the #[stable], #[unstable], #[rustc_{deprecated,const_unstable}] attributes.

Enums

InlineAttrInternal
IntTypeInternal
OptimizeAttrInternal
ReprAttrInternal
StabilityLevelInternal

The available stability levels.

TransparencyErrorInternal
UnwindAttrInternal

Traits

HasAttrsInternal

Functions

allow_internal_unstableInternal
cfg_matchesInternal

Tests if a cfg-pattern matches the cfg set

contains_feature_attrInternal

Checks if attrs contains an attribute like #![feature(feature_name)]. This will not perform any "sanity checks" on the form of the attributes.

contains_nameInternal
eval_conditionInternal

Evaluate a cfg-like condition (with any and all), using eval to evaluate individual items.

filter_by_nameInternal
find_by_nameInternal
find_crate_nameInternal
find_deprecationInternal

Finds the deprecation attribute. None if none exists.

find_repr_attrsInternal

Parse #[repr(...)] forms.

find_stabilityInternal

Collects stability info from all stability attributes in attrs. Returns None if no stability attributes are found.

find_transparencyInternal
find_unwind_attrInternal

Determine what #[unwind] attribute is present in attrs, if any.

first_attr_value_str_by_nameInternal
is_knownInternal
is_known_lint_toolInternal
is_usedInternal
list_contains_nameInternal
mark_knownInternal
mark_usedInternal
mk_attrInternal
mk_attr_from_itemInternal
mk_attr_idInternal
mk_attr_innerInternal

Returns an inner attribute with the given value and span.

mk_attr_outerInternal

Returns an outer attribute with the given value and span.

mk_doc_commentInternal
mk_list_itemInternal
mk_name_value_itemInternal
mk_name_value_item_strInternal
mk_nested_word_itemInternal
mk_word_itemInternal