rust/tests/source/issue_4257.rs

14 lines
278 B
Rust
Raw Normal View History

2021-08-30 04:09:21 -05:00
#![feature(generic_associated_types)]
#![allow(incomplete_features)]
trait Trait<T> {
type Type<'a> where T: 'a;
fn foo(x: &T) -> Self::Type<'_>;
}
impl<T> Trait<T> for () {
type Type<'a> where T: 'a = &'a T;
fn foo(x: &T) -> Self::Type<'_> {
x
}
}