mirror of https://github.com/rust-lang/rust
29 lines
484 B
Rust
29 lines
484 B
Rust
//@ check-pass
|
|
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
#![feature(impl_trait_in_assoc_type)]
|
|
|
|
pub trait AssociatedImpl {
|
|
type ImplTrait;
|
|
|
|
fn f() -> Self::ImplTrait;
|
|
}
|
|
|
|
struct S<T>(T);
|
|
|
|
trait Associated {
|
|
type A;
|
|
}
|
|
|
|
impl<'a, T: Associated<A = &'a ()>> AssociatedImpl for S<T> {
|
|
type ImplTrait = impl core::fmt::Debug;
|
|
|
|
fn f() -> Self::ImplTrait {
|
|
()
|
|
}
|
|
}
|
|
|
|
fn main() {}
|