Trait EarlyLintPass
pub trait EarlyLintPass<'ast>: Send + Sync {
Show 13 methods
// Provided methods
fn check_expr(
&mut self,
_ctx: &LintContext<'_, '_>,
_expr: &'ast Expr<'ast>,
) { ... }
fn check_item_struct(
&mut self,
_ctx: &LintContext<'_, '_>,
_item: &'ast ItemStruct<'ast>,
) { ... }
fn check_item_function(
&mut self,
_ctx: &LintContext<'_, '_>,
_item: &'ast ItemFunction<'ast>,
) { ... }
fn check_variable_definition(
&mut self,
_ctx: &LintContext<'_, '_>,
_var: &'ast VariableDefinition<'ast>,
) { ... }
fn check_import_directive(
&mut self,
_ctx: &LintContext<'_, '_>,
_import: &'ast ImportDirective<'ast>,
) { ... }
fn check_using_directive(
&mut self,
_ctx: &LintContext<'_, '_>,
_using: &'ast UsingDirective<'ast>,
) { ... }
fn check_item_contract(
&mut self,
_ctx: &LintContext<'_, '_>,
_contract: &'ast ItemContract<'ast>,
) { ... }
fn check_doc_comment(
&mut self,
_ctx: &LintContext<'_, '_>,
_comment: &'ast DocComment<'ast>,
) { ... }
fn check_item(
&mut self,
_ctx: &LintContext<'_, '_>,
_item: &'ast Item<'ast>,
) { ... }
fn check_stmt(
&mut self,
_ctx: &LintContext<'_, '_>,
_stmt: &'ast Stmt<'ast>,
) { ... }
fn check_path(&mut self, _ctx: &LintContext<'_, '_>, _path: &'ast PathSlice) { ... }
fn check_ty(&mut self, _ctx: &LintContext<'_, '_>, _ty: &'ast Type<'ast>) { ... }
fn check_full_source_unit(
&mut self,
_ctx: &LintContext<'ast, '_>,
_ast: &'ast SourceUnit<'ast>,
) { ... }
}Expand description
A lint pass that runs directly on the parsed AST.
Provided Methods§
fn check_expr(&mut self, _ctx: &LintContext<'_, '_>, _expr: &'ast Expr<'ast>)
fn check_item_struct( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemStruct<'ast>, )
fn check_item_function( &mut self, _ctx: &LintContext<'_, '_>, _item: &'ast ItemFunction<'ast>, )
fn check_variable_definition( &mut self, _ctx: &LintContext<'_, '_>, _var: &'ast VariableDefinition<'ast>, )
fn check_import_directive( &mut self, _ctx: &LintContext<'_, '_>, _import: &'ast ImportDirective<'ast>, )
fn check_using_directive( &mut self, _ctx: &LintContext<'_, '_>, _using: &'ast UsingDirective<'ast>, )
fn check_item_contract( &mut self, _ctx: &LintContext<'_, '_>, _contract: &'ast ItemContract<'ast>, )
fn check_doc_comment( &mut self, _ctx: &LintContext<'_, '_>, _comment: &'ast DocComment<'ast>, )
fn check_item(&mut self, _ctx: &LintContext<'_, '_>, _item: &'ast Item<'ast>)
fn check_stmt(&mut self, _ctx: &LintContext<'_, '_>, _stmt: &'ast Stmt<'ast>)
fn check_path(&mut self, _ctx: &LintContext<'_, '_>, _path: &'ast PathSlice)
fn check_ty(&mut self, _ctx: &LintContext<'_, '_>, _ty: &'ast Type<'ast>)
fn check_full_source_unit(
&mut self,
_ctx: &LintContext<'ast, '_>,
_ast: &'ast SourceUnit<'ast>,
)
fn check_full_source_unit( &mut self, _ctx: &LintContext<'ast, '_>, _ast: &'ast SourceUnit<'ast>, )
Runs after the complete source unit has been visited.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".