From 9a7bb0ef249258aacf144d04f5d437ba70533128 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 18 Oct 2018 15:48:48 -0400 Subject: normalize the self-type that we extract from impl --- .../ui/nll/user-annotations/normalize-self-ty.rs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/ui/nll/user-annotations/normalize-self-ty.rs (limited to 'src/test') diff --git a/src/test/ui/nll/user-annotations/normalize-self-ty.rs b/src/test/ui/nll/user-annotations/normalize-self-ty.rs new file mode 100644 index 00000000000..d97cc88dd9a --- /dev/null +++ b/src/test/ui/nll/user-annotations/normalize-self-ty.rs @@ -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 Mirror for T { + type Me = T; +} + +struct Foo(A, B); + +impl Foo::Me> { + fn m(b: A) { } +} + +fn main() { + >::m(&22); +} -- cgit 1.4.1-3-g733a5