Skip to content

Commit

Permalink
Rollup merge of rust-lang#90115 - samlich:test-issue-78561, r=oli-obk
Browse files Browse the repository at this point in the history
Add test for issue rust-lang#78561

Adds test for and closes rust-lang#78561 which previously crashed compiler.
  • Loading branch information
JohnTitor authored Oct 21, 2021
2 parents ae1c1ff + ab44e46 commit 48aa942
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/ui/nll/issue-78561.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 48aa942

Please sign in to comment.