rustc_pass_by_value lint: add test on custom types
This commit is contained in:
parent
4c3e330a8c
commit
91ed6892f7
4 changed files with 82 additions and 22 deletions
|
@ -11,6 +11,7 @@ declare_tool_lint! {
|
|||
/// The `rustc_pass_by_value` lint marks a type with `#[rustc_pass_by_value]` requiring it to always be passed by value.
|
||||
/// This is usually used for types that are thin wrappers around references, so there is no benefit to an extra
|
||||
/// layer of indirection. (Example: `Ty` which is a reference to a `TyS`)
|
||||
/// This lint relies on `#[rustc_diagnostic_item]` being available for the target.
|
||||
pub rustc::PASS_BY_VALUE,
|
||||
Warn,
|
||||
"pass by reference of a type flagged as `#[rustc_pass_by_value]`",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue