about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/group-traits.rs
blob: 2c5b6cc40e6386202f9d6cdaef1efaede68a5f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ check-pass
use std::ops::Add;

pub trait GroupOpsOwned<Rhs = Self, Output = Self>: for<'r> Add<&'r Rhs, Output = Output> {}

pub trait Curve: Sized + GroupOpsOwned<Self::AffineRepr> {
    type AffineRepr;
}

pub trait CofactorCurve: Curve<AffineRepr = <Self as CofactorCurve>::Affine> {
    type Affine;
}

fn main() {}