Skip to content

Commit

Permalink
Add a regression test for rust-lang#57399
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Oct 7, 2019
1 parent 4eba21e commit 85b7aa2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/ui/issues/issue-57399-self-return-impl-trait.rs
Original file line number Diff line number Diff line change
@@ -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() {}
8 changes: 8 additions & 0 deletions src/test/ui/issues/issue-57399-self-return-impl-trait.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 85b7aa2

Please sign in to comment.