Struct clippy::utils::SpanlessEq
[−]
[src]
pub struct SpanlessEq<'a, 'tcx> { // some fields omitted }
Type used to check whether two ast are the same. This is different from the operator
==
on ast types as this operator would compare true equality with ID and span.
Note that some expressions kinds are not considered but could be added.
Methods
impl<'a, 'tcx> SpanlessEq<'a, 'tcx>
fn new(cx: &'a LateContext<'a, 'tcx>) -> Self
fn ignore_fn(self) -> Self
fn eq_stmt(&self, left: &Stmt, right: &Stmt) -> bool
Check whether two statements are the same.
fn eq_block(&self, left: &Block, right: &Block) -> bool
Check whether two blocks are the same.
fn eq_expr(&self, left: &Expr, right: &Expr) -> bool
fn eq_pat(&self, left: &Pat, right: &Pat) -> bool
Check whether two patterns are the same.