[−][src]Struct rustc_passes::check_attr::CheckAttrVisitor

struct CheckAttrVisitor<'tcx> {
    tcx: TyCtxt<'tcx>,
}

Fields

tcx: TyCtxt<'tcx>

Implementations

impl<'tcx> CheckAttrVisitor<'tcx>[src]

fn check_attributes<'hir>(
    &self,
    hir_id: HirId,
    attrs: &'hir [Attribute],
    span: &Span,
    target: Target,
    item: Option<&Item<'_>>
)
[src]

Checks any attribute.

fn check_inline(
    &self,
    hir_id: HirId,
    attr: &Attribute,
    span: &Span,
    target: Target
) -> bool
[src]

Checks if an #[inline] is applied to a function or a closure. Returns true if valid.

fn check_track_caller<'hir>(
    &self,
    attr_span: &Span,
    attrs: &'hir [Attribute],
    span: &Span,
    target: Target
) -> bool
[src]

Checks if a #[track_caller] is applied to a non-naked function. Returns true if valid.

fn check_non_exhaustive(
    &self,
    attr: &Attribute,
    span: &Span,
    target: Target
) -> bool
[src]

Checks if the #[non_exhaustive] attribute on an item is valid. Returns true if valid.

fn check_marker(&self, attr: &Attribute, span: &Span, target: Target) -> bool[src]

Checks if the #[marker] attribute on an item is valid. Returns true if valid.

fn check_target_feature(
    &self,
    attr: &Attribute,
    span: &Span,
    target: Target
) -> bool
[src]

Checks if the #[target_feature] attribute on item is valid. Returns true if valid.

fn check_doc_alias(
    &self,
    attr: &Attribute,
    hir_id: HirId,
    target: Target
) -> bool
[src]

fn check_repr<'hir>(
    &self,
    attrs: &'hir [Attribute],
    span: &Span,
    target: Target,
    item: Option<&Item<'_>>,
    hir_id: HirId
)
[src]

Checks if the #[repr] attributes on item are valid.

fn emit_repr_error(
    &self,
    hint_span: Span,
    label_span: Span,
    hint_message: &str,
    label_message: &str
)
[src]

fn check_stmt_attributes(&self, stmt: &Stmt<'_>)[src]

fn check_expr_attributes(&self, expr: &Expr<'_>)[src]

fn check_used<'hir>(&self, attrs: &'hir [Attribute], target: Target)[src]

Trait Implementations

impl<'tcx> Visitor<'tcx> for CheckAttrVisitor<'tcx>[src]

type Map = Map<'tcx>

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for CheckAttrVisitor<'tcx>

impl<'tcx> !Send for CheckAttrVisitor<'tcx>

impl<'tcx> !Sync for CheckAttrVisitor<'tcx>

impl<'tcx> Unpin for CheckAttrVisitor<'tcx>

impl<'tcx> !UnwindSafe for CheckAttrVisitor<'tcx>

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.