rust/tests/ui/const-generics/occurs-check/bind-param.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
344 B
Rust
Raw Normal View History

2020-09-09 02:43:53 -05:00
// build-pass
#![feature(generic_const_exprs)]
2020-09-09 02:43:53 -05:00
#![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);
}