Skip to main content

EarlyCheckNode

Trait EarlyCheckNode 

Source
pub trait EarlyCheckNode<'a>: Copy {
    // Required methods
    fn id(self) -> NodeId;
    fn attrs(self) -> &'a [Attribute];
    fn check<'ecx, T: EarlyLintPass>(
        self,
        cx: &mut EarlyContextAndPass<'ecx, T>,
    );
}
Expand description

Early lints work on different nodes - either on the crate root, or on freshly loaded modules. This trait generalizes over those nodes.

Required Methods§

Source

fn id(self) -> NodeId

Source

fn attrs(self) -> &'a [Attribute]

Source

fn check<'ecx, T: EarlyLintPass>(self, cx: &mut EarlyContextAndPass<'ecx, T>)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> EarlyCheckNode<'a> for (&'a Crate, &'a [Attribute])

Source§

fn id(self) -> NodeId

Source§

fn attrs(self) -> &'a [Attribute]

Source§

fn check<'ecx, T: EarlyLintPass>(self, cx: &mut EarlyContextAndPass<'ecx, T>)

Source§

impl<'a> EarlyCheckNode<'a> for (NodeId, &'a [Attribute], &'a [Box<Item>])

Source§

fn id(self) -> NodeId

Source§

fn attrs(self) -> &'a [Attribute]

Source§

fn check<'ecx, T: EarlyLintPass>(self, cx: &mut EarlyContextAndPass<'ecx, T>)

Implementors§