Files
rust/tests/ui/const-generics/issues/issue-62878.rs

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

13 lines
421 B
Rust
Raw Normal View History

//@ revisions: full min
#![cfg_attr(full, feature(adt_const_params, generic_arg_infer))]
#![cfg_attr(full, allow(incomplete_features))]
2020-07-16 13:03:20 +02:00
fn foo<const N: usize, const A: [u8; N]>() {}
//~^ ERROR the type of const parameters must not
//[min]~| ERROR `[u8; N]` is forbidden as the type of a const generic parameter
2020-07-16 13:03:20 +02:00
fn main() {
2022-01-14 00:17:09 +00:00
foo::<_, { [1] }>();
2025-01-08 21:05:35 +00:00
//[min]~^ ERROR: const arguments cannot yet be inferred with `_`
2020-07-16 13:03:20 +02:00
}