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
This commit is contained in:
commit
4c41ea36cd
17
src/test/ui/traits/impl_trait_as_trait_return_position.rs
Normal file
17
src/test/ui/traits/impl_trait_as_trait_return_position.rs
Normal file
@ -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();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user