Skip to content

Commit 85b7aa2

Browse files
committed
Add a regression test for rust-lang#57399
1 parent 4eba21e commit 85b7aa2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// run-pass
2+
3+
trait T {
4+
type T;
5+
}
6+
7+
impl T for i32 {
8+
type T = u32;
9+
}
10+
11+
struct S<A> {
12+
a: A,
13+
}
14+
15+
16+
impl From<u32> for S<<i32 as T>::T> {
17+
fn from(a: u32) -> Self {
18+
Self { a }
19+
}
20+
}
21+
22+
fn main() {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: field is never used: `a`
2+
--> $DIR/issue-57399-self-return-impl-trait.rs:12:5
3+
|
4+
LL | a: A,
5+
| ^^^^
6+
|
7+
= note: `#[warn(dead_code)]` on by default
8+

0 commit comments

Comments
 (0)