-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
normalize the self-type that we extract from impl
- Loading branch information
1 parent
f5cc7db
commit 9a7bb0e
Showing
2 changed files
with
26 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
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,25 @@ | ||
// Regression test for #55183: check a case where the self type from | ||
// the inherent impl requires normalization to be equal to the | ||
// user-provided type. | ||
// | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
|
||
trait Mirror { | ||
type Me; | ||
} | ||
|
||
impl<T> Mirror for T { | ||
type Me = T; | ||
} | ||
|
||
struct Foo<A, B>(A, B); | ||
|
||
impl<A> Foo<A, <A as Mirror>::Me> { | ||
fn m(b: A) { } | ||
} | ||
|
||
fn main() { | ||
<Foo<&'static u32, &u32>>::m(&22); | ||
} |