about summary refs log tree commit diff
path: root/tests/ui/const-generics/adt_const_params/unsized_field-1.rs
blob: 5db031cb900fc75577845faad275535945a3599c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@ aux-build:unsized_const_param.rs
#![feature(adt_const_params)]

extern crate unsized_const_param;

use std::marker::ConstParamTy;

#[derive(ConstParamTy, Eq, PartialEq)]
//~^ ERROR: the trait `ConstParamTy_` cannot be implemented for this type
struct A([u8]);

#[derive(ConstParamTy, Eq, PartialEq)]
//~^ ERROR: the trait `ConstParamTy_` cannot be implemented for this type
struct B(&'static [u8]);

#[derive(ConstParamTy, Eq, PartialEq)]
struct C(unsized_const_param::Foo);

#[derive(std::marker::ConstParamTy, Eq, PartialEq)]
//~^ ERROR: the trait `ConstParamTy_` cannot be implemented for this type
struct D(unsized_const_param::GenericNotUnsizedParam<&'static [u8]>);

fn main() {}