Skip to content

Commit f99b4ad

Browse files
committed
Auto merge of #7678 - lengyijun:issue3414, r=giraffate
add #3414 test changelog: none fixes #3414 I found #3414 was fixed some time. So I add the tests.
2 parents 2316f4d + fb78365 commit f99b4ad

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/ui/wrong_self_convention2.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,22 @@ mod issue7179 {
6868
fn as_byte_slice(slice: &[Self]) -> &[u8];
6969
}
7070
}
71+
72+
mod issue3414 {
73+
struct CellLikeThing<T>(T);
74+
75+
impl<T> CellLikeThing<T> {
76+
// don't trigger
77+
fn into_inner(this: Self) -> T {
78+
this.0
79+
}
80+
}
81+
82+
impl<T> std::ops::Deref for CellLikeThing<T> {
83+
type Target = T;
84+
85+
fn deref(&self) -> &T {
86+
&self.0
87+
}
88+
}
89+
}

0 commit comments

Comments
 (0)