//! Regression test for . //@ revisions: full min #![cfg_attr(full, feature(generic_const_exprs))] #![cfg_attr(full, allow(incomplete_features))] struct X; impl X { const LEN: usize = S + 1; // `S + 1` is a valid const expression in this context. } struct Y { stuff: [u8; { S + 1 }], // `S + 1` is NOT a valid const expression in this context. //[min]~^ ERROR generic parameters may not be used in const operations //[full]~^^ ERROR unconstrained generic constant } fn main() {}