File tree 2 files changed +20
-0
lines changed 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,8 @@ declare_clippy_lint! {
264
264
/// The method signature is controlled by the trait and often `&self` is required for all types that implement the trait
265
265
/// (see e.g. the `std::string::ToString` trait).
266
266
///
267
+ /// Clippy allows `Pin<&Self>` and `Pin<&mut Self>` if `&self` and `&mut self` is required.
268
+ ///
267
269
/// Please find more info here:
268
270
/// https://rust-lang.github.io/api-guidelines/naming.html#ad-hoc-conversions-follow-as_-to_-into_-conventions-c-conv
269
271
///
Original file line number Diff line number Diff line change @@ -87,3 +87,21 @@ mod issue3414 {
87
87
}
88
88
}
89
89
}
90
+
91
+ // don't trigger
92
+ mod issue4546 {
93
+ use std:: pin:: Pin ;
94
+
95
+ struct S ;
96
+ impl S {
97
+ pub fn as_mut ( self : Pin < & mut Self > ) { }
98
+
99
+ pub fn as_other_thingy ( self : Pin < & Self > ) { }
100
+
101
+ pub fn is_other_thingy ( self : Pin < & Self > ) { }
102
+
103
+ pub fn to_mut ( self : Pin < & mut Self > ) { }
104
+
105
+ pub fn to_other_thingy ( self : Pin < & Self > ) { }
106
+ }
107
+ }
You can’t perform that action at this time.
0 commit comments