Add a regression test for #57399

This commit is contained in:
varkor 2019-10-07 22:10:50 +01:00
parent 4eba21e4c7
commit 85b7aa2cfb
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,22 @@
// run-pass
trait T {
type T;
}
impl T for i32 {
type T = u32;
}
struct S<A> {
a: A,
}
impl From<u32> for S<<i32 as T>::T> {
fn from(a: u32) -> Self {
Self { a }
}
}
fn main() {}

View file

@ -0,0 +1,8 @@
warning: field is never used: `a`
--> $DIR/issue-57399-self-return-impl-trait.rs:12:5
|
LL | a: A,
| ^^^^
|
= note: `#[warn(dead_code)]` on by default