Skip to content

Commit

Permalink
Rollup merge of rust-lang#70741 - DutchGhost:test-59023, r=Centril
Browse files Browse the repository at this point in the history
Add test for rust-lang#59023

Adds a test for rust-lang#59023

Closes rust-lang#59023
  • Loading branch information
Centril authored Apr 3, 2020
2 parents 0f56ccd + 0ca2a5e commit 4c41ea3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/traits/impl_trait_as_trait_return_position.rs
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 4c41ea3

Please sign in to comment.