]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/issues/issue-67945-4.rs
Rollup merge of #106321 - compiler-errors:delayed-bug-backtrace, r=Nilstrieb
[rust.git] / tests / ui / const-generics / issues / issue-67945-4.rs
1 // Regression test for
2 // https://github.com/rust-lang/rust/issues/67945#issuecomment-572617285
3
4 // revisions: full min
5 #![cfg_attr(full, feature(generic_const_exprs))]
6 #![cfg_attr(full, allow(incomplete_features))]
7
8 struct Bug<S> { //[min]~ ERROR: parameter `S` is never used
9     A: [(); { //[full]~ ERROR: overly complex generic constant
10         let x: Option<Box<S>> = None;
11         //[min]~^ ERROR: generic parameters may not be used in const operations
12         0
13     }],
14 }
15
16 fn main() {}