Skip to content

Commit c816e9e

Browse files
authored
Merge pull request #121 from dtolnay/trivialcopy
Suppress trivially_copy_pass_by_ref
2 parents 7bea5f9 + 2629bbd commit c816e9e

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/expand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ fn transform_block(
450450
clippy::missing_docs_in_private_items,
451451
clippy::needless_lifetimes,
452452
clippy::ptr_arg,
453+
clippy::trivially_copy_pass_by_ref,
453454
clippy::type_repetition_in_bounds,
454455
clippy::used_underscore_binding,
455456
)]

tests/test.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,3 +961,20 @@ mod issue110 {
961961
async fn load(&self, _key: &str) {}
962962
}
963963
}
964+
965+
// https://github.com/dtolnay/async-trait/issues/120
966+
mod issue120 {
967+
#![deny(clippy::trivially_copy_pass_by_ref)]
968+
969+
use async_trait::async_trait;
970+
971+
#[async_trait]
972+
trait Trait {
973+
async fn f(&self);
974+
}
975+
976+
#[async_trait]
977+
impl Trait for () {
978+
async fn f(&self) {}
979+
}
980+
}

0 commit comments

Comments
 (0)