]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/issue_4257.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[rust.git] / src / tools / rustfmt / tests / source / issue_4257.rs
1 #![feature(generic_associated_types)]
2 #![allow(incomplete_features)]
3
4 trait Trait<T> {
5     type Type<'a> where T: 'a;
6     fn foo(x: &T) -> Self::Type<'_>;
7 }
8 impl<T> Trait<T> for () {
9     type Type<'a> where T: 'a = &'a T;
10     fn foo(x: &T) -> Self::Type<'_> {
11         x
12     }
13 }