Skip to main content

Module disallowed_pass_by_ref

Module disallowed_pass_by_ref 

Source

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ยง

DisallowedPassByRef

Staticsยง

DISALLOWED_PASS_BY_REF
The disallowed_pass_by_ref lint 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: Ty which is a reference to an Interned<TyKind>)

Functionsยง

gen_args ๐Ÿ”’
path_for_rustc_pass_by_value ๐Ÿ”’