summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/occurs-check/bind-param.rs
blob: ee4244051a1edf19fc9b920c502d4070a7a73054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// build-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

// This test does not use any "unevaluated" consts, so it should compile just fine.

fn bind<const N: usize>(value: [u8; N]) -> [u8; N] {
    todo!()
}

fn sink(_: [u8; 5]) {}

fn main() {
    let mut arr = Default::default();
    arr = bind(arr);
    sink(arr);
}