]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue_4257.rs
Rollup merge of #95040 - frank-king:fix/94981, r=Mark-Simulacrum
[rust.git] / src / tools / rustfmt / tests / target / issue_4257.rs
1 #![feature(generic_associated_types)]
2 #![allow(incomplete_features)]
3
4 trait Trait<T> {
5     type Type<'a>
6     where
7         T: 'a;
8     fn foo(x: &T) -> Self::Type<'_>;
9 }
10 impl<T> Trait<T> for () {
11     type Type<'a>
12     where
13         T: 'a,
14     = &'a T;
15     fn foo(x: &T) -> Self::Type<'_> {
16         x
17     }
18 }