[][src]Struct libslide::linter::stmt::unary_series::UnarySeriesLinter

pub struct UnarySeriesLinter<'a> {
    source: &'a str,
    diagnostics: Vec<Diagnostic>,
}

Fields

source: &'a strdiagnostics: Vec<Diagnostic>

Implementations

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

pub fn new(source: &'a str) -> Self[src]

Trait Implementations

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

The unary series lint detects trivially-reducible chains of unary operators.

For example, the following chains of unary expressions can be reduced to a more trivial form:

---1   -> -1
+++1   ->  1
+-+-+- -> -1

Chaining unary operators is not standard style in mathematical expressions and can be misleading. For example, --x may be interpreted to be the prefix decrement operator available in some computer programming languages, which is absent in canonical mathematical notation.

impl<'a> LintRule<'a, StmtList> for UnarySeriesLinter<'a>[src]

impl<'a> StmtVisitor<'a> for UnarySeriesLinter<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for UnarySeriesLinter<'a>

impl<'a> Send for UnarySeriesLinter<'a>

impl<'a> Sync for UnarySeriesLinter<'a>

impl<'a> Unpin for UnarySeriesLinter<'a>

impl<'a> UnwindSafe for UnarySeriesLinter<'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.