diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-04-03 22:55:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-03 22:55:16 +0200 |
| commit | 4c41ea36cda77748b532cf6d989a8d5d2fcc872e (patch) | |
| tree | 4eb869837e228d81b08b2fb4db3ad1af00942039 | |
| parent | 0f56ccdb345fd343d3d4b95efc0f16e734505c39 (diff) | |
| parent | 0ca2a5e52cb428a8381988e3551649ae07d4eb61 (diff) | |
| download | rust-4c41ea36cda77748b532cf6d989a8d5d2fcc872e.tar.gz rust-4c41ea36cda77748b532cf6d989a8d5d2fcc872e.zip | |
Rollup merge of #70741 - DutchGhost:test-59023, r=Centril
Add test for #59023 Adds a test for https://github.com/rust-lang/rust/issues/59023 Closes https://github.com/rust-lang/rust/issues/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(); +} |
