Skip to main content

Module let_underscore

Module let_underscore 

Source

Re-exportsΒ§

use rustc_errors::MultiSpan; πŸ”’
use rustc_hir as hir; πŸ”’
use rustc_lint_defs::declare_lint; πŸ”’
use rustc_lint_defs::declare_lint_pass; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_span::Symbol; πŸ”’
use rustc_span::sym; πŸ”’
use crate::diagnostics::NonBindingLet; πŸ”’
use crate::diagnostics::NonBindingLetSub; πŸ”’
use crate::LateContext; πŸ”’
use crate::LateLintPass; πŸ”’
use crate::LintContext; πŸ”’

StructsΒ§

LetUnderscore

ConstantsΒ§

SYNC_GUARD_SYMBOLS πŸ”’

StaticsΒ§

LET_UNDERSCORE_DROP
The let_underscore_drop lint checks for statements which don’t bind an expression which has a non-trivial Drop implementation to anything, causing the expression to be dropped immediately instead of at end of scope.
LET_UNDERSCORE_DROP_GUARD
The let_underscore_drop_guard lint checks for statements which don’t bind a DropGuard to anything, causing its closure to run immediately instead of at end of scope, which is typically incorrect.
LET_UNDERSCORE_LOCK
The let_underscore_lock lint checks for statements which don’t bind a mutex to anything, causing the lock to be released immediately instead of at end of scope, which is typically incorrect.