Module syntax::attr[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Re-exports

pub use self::StabilityLevel::*;
pub use self::ReprAttr::*;
pub use self::IntType::*;
use ast;
use ast::AttrId;
use ast::Attribute;
use ast::Name;
use ast::Ident;
use ast::Path;
use ast::PathSegment;
use ast::MetaItem;
use ast::MetaItemKind;
use ast::NestedMetaItem;
use ast::NestedMetaItemKind;
use ast::Lit;
use ast::LitKind;
use ast::Expr;
use ast::ExprKind;
use ast::Item;
use ast::Local;
use ast::Stmt;
use ast::StmtKind;
use ast::GenericParam;
use codemap::BytePos;
use codemap::Spanned;
use codemap::respan;
use codemap::dummy_spanned;
use syntax_pos::Span;
use errors::Handler;
use feature_gate::Features;
use feature_gate::GatedCfg;
use parse::lexer::comments::doc_comment_style;
use parse::lexer::comments::strip_doc_comment_decoration;
use parse::parser::Parser;
use parse;
use parse::ParseSess;
use parse::PResult;
use parse::token;
use parse::token::Token;
use ptr::P;
use symbol::Symbol;
use tokenstream::TokenStream;
use tokenstream::TokenTree;
use tokenstream::Delimited;
use util::ThinVec;
use GLOBALS;
use std::iter;

Structs

Deprecation [
Experimental
]
RustcConstUnstable [
Experimental
]
RustcDeprecation [
Experimental
]
Stability [
Experimental
]

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

Enums

AttrError [
Experimental
]
InlineAttr [
Experimental
]
IntType [
Experimental
]
ReprAttr [
Experimental
]
StabilityLevel [
Experimental
]

The available stability levels.

UnwindAttr [
Experimental
]

Constants

RUST_KNOWN_TOOL [
Experimental
]

Traits

HasAttrs [
Experimental
]

Functions

cfg_matches [
Experimental
]

Tests if a cfg-pattern matches the cfg set

contains_feature_attr [
Experimental
]

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

contains_name [
Experimental
]
eval_condition [
Experimental
]

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

find_by_name [
Experimental
]
find_crate_name [
Experimental
]
find_deprecation [
Experimental
]

Find the deprecation attribute. None if none exists.

find_deprecation_generic [
Experimental
]
find_repr_attrs [
Experimental
]

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

find_stability [
Experimental
]

Find the first stability attribute. None if none exists.

find_stability_generic [
Experimental
]
find_unwind_attr [
Experimental
]

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

first_attr_value_str_by_name [
Experimental
]
handle_errors [
Experimental
]
int_type_of_word [
Experimental
]
is_known [
Experimental
]
is_known_tool [
Experimental
]
is_used [
Experimental
]
list_contains_name [
Experimental
]
mark_known [
Experimental
]
mark_used [
Experimental
]
mk_attr_id [
Experimental
]
mk_attr_inner [
Experimental
]

Returns an inner attribute with the given value.

mk_attr_outer [
Experimental
]

Returns an outer attribute with the given value.

mk_list_item [
Experimental
]
mk_name_value_item [
Experimental
]
mk_name_value_item_str [
Experimental
]
mk_nested_word_item [
Experimental
]
mk_spanned_attr_inner [
Experimental
]

Returns an inner attribute with the given value and span.

mk_spanned_attr_outer [
Experimental
]

Returns an outer attribute with the given value and span.

mk_sugared_doc_attr [
Experimental
]
mk_word_item [
Experimental
]
name_from_path [
Experimental
]