Struct clippy_lints::utils::SpanlessEq
[−]
[src]
pub struct SpanlessEq<'a, 'tcx: 'a> { /* 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: 'a> SpanlessEq<'a, 'tcx>
[src]
pub fn new(cx: &'a LateContext<'a, 'tcx>) -> Self
[src]
pub fn ignore_fn(self) -> Self
[src]
pub fn eq_stmt(&self, left: &Stmt, right: &Stmt) -> bool
[src]
Check whether two statements are the same.
pub fn eq_block(&self, left: &Block, right: &Block) -> bool
[src]
Check whether two blocks are the same.
pub fn eq_expr(&self, left: &Expr, right: &Expr) -> bool
[src]
pub fn eq_pat(&self, left: &Pat, right: &Pat) -> bool
[src]
Check whether two patterns are the same.