summaryrefslogtreecommitdiff
path: root/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs
blob: 17ef396164efdf6e467c895d509156b59f13c6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(incomplete_features)]
#![feature(adt_const_params)]

#[derive(PartialEq, Eq)]
struct ImplementsConstParamTy;
impl std::marker::ConstParamTy for ImplementsConstParamTy {}

struct CantParam(ImplementsConstParamTy);

impl std::marker::ConstParamTy for CantParam {}
//~^ error: the type `CantParam` does not `#[derive(Eq)]`

fn check<T: std::marker::ConstParamTy>() {}

fn main() {
    check::<ImplementsConstParamTy>();
}