From 83370efdb64058397b4cd99ee2d31cf94b91757c Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Fri, 9 Oct 2020 18:32:42 +0900 Subject: [PATCH] Add a regression test for issue-65934 --- src/test/ui/associated-types/issue-65934.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/ui/associated-types/issue-65934.rs diff --git a/src/test/ui/associated-types/issue-65934.rs b/src/test/ui/associated-types/issue-65934.rs new file mode 100644 index 00000000000..e17b11c5eae --- /dev/null +++ b/src/test/ui/associated-types/issue-65934.rs @@ -0,0 +1,17 @@ +// check-pass + +trait Trait { + type Assoc; +} + +impl Trait for () { + type Assoc = (); +} + +fn unit() -> impl Into<<() as Trait>::Assoc> {} + +pub fn ice() { + Into::into(unit()); +} + +fn main() {}