Skip to content

Commit

Permalink
Auto merge of #7678 - lengyijun:issue3414, r=giraffate
Browse files Browse the repository at this point in the history
add #3414 test

changelog: none
fixes #3414

I found #3414 was fixed some time. So I add the tests.
  • Loading branch information
bors committed Sep 17, 2021
2 parents 2316f4d + fb78365 commit dafe975
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/ui/wrong_self_convention2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

0 comments on commit dafe975

Please sign in to comment.