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>();
}
|