]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-93340.rs
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
[rust.git] / src / test / ui / generic-associated-types / issue-93340.rs
1 // check-pass
2
3 #![feature(generic_associated_types)]
4
5 pub trait Scalar: 'static {
6     type RefType<'a>: ScalarRef<'a>;
7 }
8
9 pub trait ScalarRef<'a>: 'a {}
10
11 fn cmp_eq<'a, 'b, A: Scalar, B: Scalar, O: Scalar>(a: A::RefType<'a>, b: B::RefType<'b>) -> O {
12     todo!()
13 }
14
15 fn build_expression<A: Scalar, B: Scalar, O: Scalar>(
16 ) -> impl Fn(A::RefType<'_>, B::RefType<'_>) -> O {
17     cmp_eq
18 }
19
20 fn main() {}