diff options
| author | lyj <sjtu5140809011@gmail.com> | 2021-09-16 16:52:57 +0800 |
|---|---|---|
| committer | lyj <sjtu5140809011@gmail.com> | 2021-09-16 16:52:57 +0800 |
| commit | fb783653322156ba616e6175e76fd53106977a3f (patch) | |
| tree | 93868615b6b58c7f2043686bdb456629b451daec | |
| parent | 2316f4da83a3952abca808f1f1b2c7ea0a9ee401 (diff) | |
| download | rust-fb783653322156ba616e6175e76fd53106977a3f.tar.gz rust-fb783653322156ba616e6175e76fd53106977a3f.zip | |
add 3414 test
| -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 + } + } +} |
