]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/unstable-gated-fields.rs
Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyup
[rust.git] / src / test / ui / pattern / usefulness / unstable-gated-fields.rs
1 #![feature(unstable_test_feature)]
2
3 // aux-build:unstable.rs
4
5 extern crate unstable;
6
7 use unstable::UnstableStruct;
8
9 fn main() {
10     let UnstableStruct { stable, stable2, } = UnstableStruct::default();
11     //~^ pattern does not mention field `unstable`
12
13     let UnstableStruct { stable, unstable, } = UnstableStruct::default();
14     //~^ pattern does not mention field `stable2`
15
16     // OK: stable field is matched
17     let UnstableStruct { stable, stable2, unstable } = UnstableStruct::default();
18 }