Re-exportsยง
use rustc_attr_ir::find_attr;๐use rustc_hir::def::Res;๐use rustc_hir as hir;๐use rustc_hir::AmbigArg;๐use rustc_hir::GenericArg;๐use rustc_hir::PathSegment;๐use rustc_hir::QPath;๐use rustc_hir::TyKind;๐use rustc_lint_defs::declare_lint_pass;๐use rustc_lint_defs::declare_tool_lint;๐use rustc_middle::ty;๐use crate::diagnostics::DisallowedPassByRefDiag;๐use crate::LateContext;๐use crate::LateLintPass;๐use crate::LintContext;๐
Structsยง
Staticsยง
- DISALLOWED_
PASS_ BY_ REF - The
disallowed_pass_by_reflint detects if types marked with#[rustc_pass_by_value]are passed by reference. Types with this marker are usually thin wrappers around references, so there is no benefit to an extra layer of indirection. (Example:Tywhich is a reference to anInterned<TyKind>)
Functionsยง
- gen_
args ๐ - path_
for_ ๐rustc_ pass_ by_ value