summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue_4257.rs
blob: 2b887fadb621c32df0ed07d6aa74d879ad299a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![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
    }
}