add 3414 test

This commit is contained in:
lyj 2021-09-16 16:52:57 +08:00
parent 2316f4da83
commit fb78365332

View File

@ -68,3 +68,22 @@ trait Foo: Sized {
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
}
}
}