Rollup merge of #90115 - samlich:test-issue-78561, r=oli-obk

Add test for issue #78561

Adds test for and closes #78561 which previously crashed compiler.
This commit is contained in:
Yuki Okushi 2021-10-22 19:42:52 +09:00 committed by GitHub
commit a741f682fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>(T);
pub trait Tr {
type B;
}
impl<'a, 'b, T: Tr<B = dyn Tr2<'a, 'b>>> Trait for A<T> {
type A = impl core::fmt::Debug;
fn f() -> Self::A {}
}
fn main() {}