Skip to main content

Module drop_forget_useless

Module drop_forget_useless 

Source

Re-exportsΒ§

use rustc_hir::Arm; πŸ”’
use rustc_hir::Expr; πŸ”’
use rustc_hir::ExprKind; πŸ”’
use rustc_hir::Node; πŸ”’
use rustc_hir::StmtKind; πŸ”’
use rustc_lint_defs::declare_lint; πŸ”’
use rustc_lint_defs::declare_lint_pass; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_span::sym; πŸ”’
use crate::diagnostics::DropCopyDiag; πŸ”’
use crate::diagnostics::DropInPlaceCopyDiag; πŸ”’
use crate::diagnostics::DropInPlaceRefDiag; πŸ”’
use crate::diagnostics::DropRefDiag; πŸ”’
use crate::diagnostics::ForgetCopyDiag; πŸ”’
use crate::diagnostics::ForgetRefDiag; πŸ”’
use crate::diagnostics::UndroppedManuallyDropsDiag; πŸ”’
use crate::diagnostics::UndroppedManuallyDropsInPlaceDiag; πŸ”’
use crate::diagnostics::UndroppedManuallyDropsInPlaceSuggestion; πŸ”’
use crate::diagnostics::UndroppedManuallyDropsSuggestion; πŸ”’
use crate::diagnostics::UseLetUnderscoreIgnoreSuggestion; πŸ”’
use crate::utils::std_or_core; πŸ”’
use crate::LateContext; πŸ”’
use crate::LateLintPass; πŸ”’
use crate::LintContext; πŸ”’

StructsΒ§

DropForgetUseless

StaticsΒ§

DROPPING_COPY_TYPES
The dropping_copy_types lint checks for calls to std::mem::drop and std::ptr::drop_in_place where the dropped value implements the Copy trait.
DROPPING_REFERENCES
The dropping_references lint checks for calls to std::mem::drop and std::ptr::drop_in_place where the dropped type is a reference instead of an owned value.
FORGETTING_COPY_TYPES
The forgetting_copy_types lint checks for calls to std::mem::forget with a value that derives the Copy trait.
FORGETTING_REFERENCES
The forgetting_references lint checks for calls to std::mem::forget with a reference instead of an owned value.
UNDROPPED_MANUALLY_DROPS
The undropped_manually_drops lint check for calls to std::mem::drop and std::ptr::drop_in_place where the dropped value is std::mem::ManuallyDrop which doesn’t drop.

FunctionsΒ§

is_single_call_in_arm πŸ”’