From ab44e46345653803e86e6e05358fdb1bb1a6d07b Mon Sep 17 00:00:00 2001 From: samlich <1349989+samlich@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:51:31 +0000 Subject: [PATCH] Add test for issue #78561 --- src/test/ui/nll/issue-78561.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/ui/nll/issue-78561.rs diff --git a/src/test/ui/nll/issue-78561.rs b/src/test/ui/nll/issue-78561.rs new file mode 100644 index 0000000000000..55147fcd1bd27 --- /dev/null +++ b/src/test/ui/nll/issue-78561.rs @@ -0,0 +1,23 @@ +// check-pass +#![feature(type_alias_impl_trait)] + +pub trait Trait { + type A; + + fn f() -> Self::A; +} + +pub trait Tr2<'a, 'b> {} + +pub struct A(T); +pub trait Tr { + type B; +} + +impl<'a, 'b, T: Tr>> Trait for A { + type A = impl core::fmt::Debug; + + fn f() -> Self::A {} +} + +fn main() {}