about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-generic-const-parameter-types.rs
blob: cc374ea3eb2e5f377dffa39ddc4c6f9c91a40dd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ [feature] check-pass
//@ revisions: normal feature

#![cfg_attr(feature, feature(adt_const_params, generic_const_parameter_types))]
#![cfg_attr(feature, expect(incomplete_features))]

struct MyADT<const LEN: usize, const ARRAY: [u8; LEN]>;
//[normal]~^ ERROR: the type of const parameters must not depend on other generic parameters
//[normal]~| ERROR: `[u8; LEN]` is forbidden as the type of a const generic parameter

fn main() {}