1 // Test that structural match is only permitted with a feature gate,
2 // and that if a feature gate is supplied, it permits the type to be
5 // revisions: with_gate no_gate
7 // gate-test-structural_match
10 #![feature(rustc_attrs)]
11 #![cfg_attr(with_gate, feature(structural_match))]
13 #[structural_match] //[no_gate]~ ERROR semantics of constant patterns is not yet settled
18 const FOO: Foo = Foo { x: 0 };
21 fn main() { //[with_gate]~ ERROR fatal error triggered by #[rustc_error]