diff options
author | DutchGhost <kasper199914@gmail.com> | 2020-04-03 18:28:01 +0200 |
---|---|---|
committer | DutchGhost <kasper199914@gmail.com> | 2020-04-03 18:31:04 +0200 |
commit | 0ca2a5e52cb428a8381988e3551649ae07d4eb61 (patch) | |
tree | 08971a751f46337365c40d3082d4740366c9582a | |
parent | 8ab82b87af4f20b6c0a481e050517103d50263e9 (diff) | |
download | rust-0ca2a5e52cb428a8381988e3551649ae07d4eb61.tar.gz |
Add test for #59023
-rw-r--r-- | src/test/ui/traits/impl_trait_as_trait_return_position.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/traits/impl_trait_as_trait_return_position.rs b/src/test/ui/traits/impl_trait_as_trait_return_position.rs new file mode 100644 index 00000000000..c3325fd80ca --- /dev/null +++ b/src/test/ui/traits/impl_trait_as_trait_return_position.rs @@ -0,0 +1,17 @@ +// check-pass + +trait A { + type Foo; +} + +impl<T> A for T { + type Foo = (); +} + +fn foo() -> impl std::borrow::Borrow<<u8 as A>::Foo> { + () +} + +fn main() { + foo(); +} |