blob: 083aedece51a52e3b267345d43921dd3332611da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//! Regression test for revealing associated types through specialization during const eval.
//@ check-pass
#![feature(specialization)]
//~^ WARNING the feature `specialization` is incomplete and may not be safe to use
trait Foo {
const ASSOC: usize;
}
impl Foo for u32 {
default const ASSOC: usize = 0;
}
fn foo() -> [u8; 0] {
[0; <u32 as Foo>::ASSOC]
}
fn main() {}
|