[][src]Struct rustc_ap_rustc_parse::config::StripUnconfigured

pub struct StripUnconfigured<'a> {
    pub sess: &'a ParseSess,
    pub features: Option<&'a Features>,
}

A folder that strips out items that do not belong in the current configuration.

Fields

sess: &'a ParseSessfeatures: Option<&'a Features>

Methods

impl<'a> StripUnconfigured<'a>[src]

pub fn configure<T: HasAttrs>(&mut self, node: T) -> Option<T>[src]

pub fn process_cfg_attrs<T: HasAttrs>(&mut self, node: &mut T)[src]

Parse and expand all cfg_attr attributes into a list of attributes that are within each cfg_attr that has a true configuration predicate.

Gives compiler warnigns if any cfg_attr does not contain any attributes and is in the original source code. Gives compiler errors if the syntax of any cfg_attr is incorrect.

pub fn in_cfg(&self, attrs: &[Attribute]) -> bool[src]

Determines if a node with the given attributes should be included in this configuration.

pub fn maybe_emit_expr_attr_err(&self, attr: &Attribute)[src]

If attributes are not allowed on expressions, emit an error for attr

pub fn configure_foreign_mod(&mut self, foreign_mod: &mut ForeignMod)[src]

pub fn configure_generic_params(&mut self, params: &mut Vec<GenericParam>)[src]

pub fn configure_item_kind(&mut self, item: &mut ItemKind)[src]

pub fn configure_expr_kind(&mut self, expr_kind: &mut ExprKind)[src]

pub fn configure_expr(&mut self, expr: &mut P<Expr>)[src]

pub fn configure_pat(&mut self, pat: &mut P<Pat>)[src]

pub fn configure_fn_decl(&mut self, fn_decl: &mut FnDecl)[src]

Trait Implementations

impl<'a> MutVisitor for StripUnconfigured<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for StripUnconfigured<'a>

impl<'a> !Send for StripUnconfigured<'a>

impl<'a> !Sync for StripUnconfigured<'a>

impl<'a> Unpin for StripUnconfigured<'a>

impl<'a> !UnwindSafe for StripUnconfigured<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<E> SpecializationError for E[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.