From bfc60466bdbab90d578c6912083fe2e238e29166 Mon Sep 17 00:00:00 2001 From: Eric <e.lim0322@gmail.com> Date: Mon, 30 Aug 2021 21:13:42 +1200 Subject: [PATCH] test: add test for #4954 --- tests/source/issue_4954.rs | 5 +++++ tests/target/issue_4954.rs | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/source/issue_4954.rs create mode 100644 tests/target/issue_4954.rs diff --git a/tests/source/issue_4954.rs b/tests/source/issue_4954.rs new file mode 100644 index 00000000000..8011c601b65 --- /dev/null +++ b/tests/source/issue_4954.rs @@ -0,0 +1,5 @@ +trait Foo { + type Arg<'a>; +} + +struct Bar<T>(T) where for<'a> T: Foo<Arg<'a> = ()>; diff --git a/tests/target/issue_4954.rs b/tests/target/issue_4954.rs new file mode 100644 index 00000000000..aa5e79befe9 --- /dev/null +++ b/tests/target/issue_4954.rs @@ -0,0 +1,7 @@ +trait Foo { + type Arg<'a>; +} + +struct Bar<T>(T) +where + for<'a> T: Foo<Arg<'a> = ()>;