Skip to content

Commit edb2e4a

Browse files
authored
Merge pull request #28 from dtolnay/local
Ignore non_local_definitions false positive in macro-generated impls
2 parents eda19ab + f206812 commit edb2e4a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/macros.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,28 @@ macro_rules! __internal_clone_trait_object {
8888

8989
// The impl.
9090
(impl ($($generics:tt)*) ($($path:tt)*) ($($bound:tt)*)) => {
91+
#[allow(unknown_lints, non_local_definitions)] // false positive: https://github.com/rust-lang/rust/issues/121621
9192
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + 'clone> where $($bound)* {
9293
fn clone(&self) -> Self {
9394
$crate::clone_box(&**self)
9495
}
9596
}
97+
98+
#[allow(unknown_lints, non_local_definitions)] // false positive: https://github.com/rust-lang/rust/issues/121621
9699
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Send + 'clone> where $($bound)* {
97100
fn clone(&self) -> Self {
98101
$crate::clone_box(&**self)
99102
}
100103
}
104+
105+
#[allow(unknown_lints, non_local_definitions)] // false positive: https://github.com/rust-lang/rust/issues/121621
101106
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Sync + 'clone> where $($bound)* {
102107
fn clone(&self) -> Self {
103108
$crate::clone_box(&**self)
104109
}
105110
}
111+
112+
#[allow(unknown_lints, non_local_definitions)] // false positive: https://github.com/rust-lang/rust/issues/121621
106113
impl<'clone, $($generics)*> $crate::__private::Clone for $crate::__private::Box<dyn $($path)* + $crate::__private::Send + $crate::__private::Sync + 'clone> where $($bound)* {
107114
fn clone(&self) -> Self {
108115
$crate::clone_box(&**self)

0 commit comments

Comments
 (0)