rust/tests/ui/const-generics/issues/issue-67945-2.rs

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

17 lines
397 B
Rust
Raw Normal View History

2020-10-03 11:00:18 -05:00
//@ revisions: full min
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(generic_const_exprs))]
struct Bug<S: ?Sized> {
A: [(); {
//[full]~^ ERROR overly complex generic constant
let x: Option<Box<Self>> = None;
//[min]~^ ERROR generic `Self` types are currently not permitted in anonymous constants
0
}],
B: S
}
fn main() {}