diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-10 08:54:42 +0000 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-10 17:42:20 +0000 |
| commit | 91ed6892f7ec60fb76eeaaa024919f293a58d733 (patch) | |
| tree | 220e24d714a7892d27f15869ac42728c1a6bd9f0 /compiler/rustc_lint/src | |
| parent | 4c3e330a8c023af20beb23a3a46b5d6d77a62839 (diff) | |
| download | rust-91ed6892f7ec60fb76eeaaa024919f293a58d733.tar.gz rust-91ed6892f7ec60fb76eeaaa024919f293a58d733.zip | |
rustc_pass_by_value lint: add test on custom types
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/pass_by_value.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/pass_by_value.rs b/compiler/rustc_lint/src/pass_by_value.rs index 0bfa2a673c2..0847f600f9d 100644 --- a/compiler/rustc_lint/src/pass_by_value.rs +++ b/compiler/rustc_lint/src/pass_by_value.rs @@ -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]`", |
