Skip to main content

Module dangerous_unary_operator

Module dangerous_unary_operator 

Source

Re-exportsยง

use super::DangerousUnaryOperator; ๐Ÿ”’
use crate::linter::EarlyLintPass; ๐Ÿ”’
use crate::linter::LintContext; ๐Ÿ”’
use crate::sol::Severity; ๐Ÿ”’
use crate::sol::SolLint; ๐Ÿ”’
use solar::ast::Expr; ๐Ÿ”’
use solar::ast::ExprKind; ๐Ÿ”’
use solar::ast::UnOpKind; ๐Ÿ”’

Staticsยง

DANGEROUS_UNARY_OPERATOR

Functionsยง

leads_with_fusable_unary ๐Ÿ”’
Whether the leftmost operand of expr is a - or ~ unary, following the left spine of binary and ternary expressions so x =- a + 1 (x = (-a) + 1) is caught as well.