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

pub(in check_attr) struct CheckAttrVisitor<'tcx> {
    tcx: TyCtxt<'tcx>,
}

Fields

tcx: TyCtxt<'tcx>

Implementations

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

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

Checks any attribute.

pub(in check_attr) 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.

pub(in check_attr) 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.

pub(in check_attr) 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.

pub(in check_attr) 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.

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

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

pub(in check_attr) fn doc_alias_str_error(
    &self,
    meta: &NestedMetaItem
)
[src]

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

pub(in check_attr) fn check_cold(
    &self,
    hir_id: HirId,
    attr: &Attribute,
    span: &Span,
    target: Target
)
[src]

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

Checks if #[link_name] is applied to an item other than a foreign function or static.

Checks if #[no_link] is applied to an extern crate. Returns true if valid.

pub(in check_attr) fn check_export_name(
    &self,
    attr: &Attribute,
    span: &Span,
    target: Target
) -> bool
[src]

Checks if #[export_name] is applied to a function or static. Returns true if valid.

pub(in check_attr) fn check_rustc_args_required_const(
    &self,
    attr: &Attribute,
    span: &Span,
    target: Target,
    item: Option<ItemLike<'_>>
) -> bool
[src]

Checks if #[rustc_args_required_const] is applied to a function and has a valid argument.

Checks if #[link_section] is applied to a function or static.

pub(in check_attr) fn check_no_mangle(
    &self,
    hir_id: HirId,
    attr: &Attribute,
    span: &Span,
    target: Target
)
[src]

Checks if #[no_mangle] is applied to a function or static.

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

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

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

pub(in check_attr) fn check_allow_internal_unstable(
    &self,
    attr: &Attribute,
    span: &Span,
    target: Target,
    attrs: &[Attribute]
) -> bool
[src]

Outputs an error for #[allow_internal_unstable] which can only be applied to macros. (Allows proc_macro functions)

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

Outputs an error for #[allow_internal_unstable] which can only be applied to macros. (Allows proc_macro functions)

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.