[][src]Struct libslide::linter::expr_pat::similar_names::SimilarNamesLinter

pub struct SimilarNamesLinter<'a> {
    names: BTreeMap<&'a str, NameCollection>,
}

Fields

names: BTreeMap<&'a str, NameCollection>

Implementations

impl<'a> SimilarNamesLinter<'a>[src]

fn check_names(self) -> Vec<Diagnostic>[src]

Trait Implementations

impl<'a> Default for SimilarNamesLinter<'a>[src]

impl<'a> DiagnosticRecord for SimilarNamesLinter<'a>[src]

The similar names lint detects expression patterns with very similar names.

For example, the following pattern expression has different patterns with the same suffix "a":

$a + #a + _a + $a

While this is expression is semantically valid, it can be difficuly to read and misleading, since "a" is used in three separate and independent patterns. A clearer expression would be

$a + #b + _c + $a

impl<'a> ExprPatVisitor<'a> for SimilarNamesLinter<'a>[src]

impl<'a> LintRule<'a, RcExprPat> for SimilarNamesLinter<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SimilarNamesLinter<'a>

impl<'a> Send for SimilarNamesLinter<'a>

impl<'a> Sync for SimilarNamesLinter<'a>

impl<'a> Unpin for SimilarNamesLinter<'a>

impl<'a> UnwindSafe for SimilarNamesLinter<'a>

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.