diff options
| -rw-r--r-- | tests/ui/wrong_self_convention2.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/wrong_self_convention2.rs b/tests/ui/wrong_self_convention2.rs index 501bc1e6a85..dd3e842c925 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>(T); + + impl<T> CellLikeThing<T> { + // don't trigger + fn into_inner(this: Self) -> T { + this.0 + } + } + + impl<T> std::ops::Deref for CellLikeThing<T> { + type Target = T; + + fn deref(&self) -> &T { + &self.0 + } + } +} |
