forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a regression test for rust-lang#57399
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|