about summary refs log tree commit diff
path: root/tests/ui/const-generics/adt_const_params/alias_const_param_ty-1.rs
blob: e90426ec0c762652afff08ec6131af4cb507cdc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ check-pass
#![feature(adt_const_params, lazy_type_alias)]
//~^ WARN: the feature `lazy_type_alias` is incomplete

pub type Matrix = [usize; 1];
const EMPTY_MATRIX: Matrix = [0; 1];

pub struct Walk<const REMAINING: Matrix> {}

impl Walk<EMPTY_MATRIX> {
    pub const fn new() -> Self {
        Self {}
    }
}

fn main() {
    let _ = Walk::new();
}