summary refs log tree commit diff
path: root/src/test/ui/specialization/issue-51892.rs
blob: 3cd0711ae42c641e9df857cf60a3c4ad3a9a6ed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![allow(incomplete_features)]
#![feature(const_generics)]
#![feature(const_evaluatable_checked)]
#![feature(specialization)]

pub trait Trait {
    type Type;
}

impl<T: ?Sized> Trait for T {
    default type Type = [u8; 1];
}

impl<T: Trait> Trait for *const T {
    type Type = [u8; std::mem::size_of::<<T as Trait>::Type>()];
    //~^ ERROR: unconstrained generic constant
}

fn main() {}