Re-exportsยง
use rustc_hir::def::DefKind;๐use rustc_hir::Expr;๐use rustc_hir::ExprKind;๐use rustc_lint_defs::declare_lint;๐use rustc_lint_defs::declare_lint_pass;๐use rustc_middle::ty;๐use rustc_middle::ty::Unnormalized;๐use rustc_middle::ty::adjustment::Adjust;๐use rustc_middle::ty::adjustment::DerefAdjustKind;๐use rustc_span::sym;๐use crate::context::LintContext;๐use crate::diagnostics::NoopMethodCallDiag;๐use crate::diagnostics::SuspiciousDoubleRefCloneDiag;๐use crate::diagnostics::SuspiciousDoubleRefDerefDiag;๐use crate::LateContext;๐use crate::LateLintPass;๐
Structsยง
Staticsยง
- NOOP_
METHOD_ CALL - The
noop_method_calllint detects specific calls to noop methods such as a calling<&T as Clone>::clonewhereT: !Clone. - SUSPICIOUS_
DOUBLE_ REF_ OP - The
suspicious_double_ref_oplint checks for usage of.clone()/.borrow()/.deref()on an&&TwhenT: !Deref/Borrow/Clone, which means the call will return the inner&T, instead of performing the operation on the underlyingTand can be confusing.