diff --git a/tests/ui/wrong_self_convention2.rs b/tests/ui/wrong_self_convention2.rs index 501bc1e6a85c..dd3e842c9251 100644 --- a/tests/ui/wrong_self_convention2.rs +++ b/tests/ui/wrong_self_convention2.rs @@ -68,3 +68,22 @@ mod issue7179 { fn as_byte_slice(slice: &[Self]) -> &[u8]; } } + +mod issue3414 { + struct CellLikeThing(T); + + impl CellLikeThing { + // don't trigger + fn into_inner(this: Self) -> T { + this.0 + } + } + + impl std::ops::Deref for CellLikeThing { + type Target = T; + + fn deref(&self) -> &T { + &self.0 + } + } +}