]>
Commit | Line | Data |
---|---|---|
5e7ed085 FG |
1 | // aux-build:unstable.rs |
2 | ||
3 | extern crate unstable; | |
4 | ||
5 | use unstable::UnstableStruct; | |
6 | ||
7 | fn main() { | |
8 | let UnstableStruct { stable } = UnstableStruct::default(); | |
9 | //~^ pattern does not mention field `stable2` and inaccessible fields | |
10 | ||
11 | let UnstableStruct { stable, stable2 } = UnstableStruct::default(); | |
12 | //~^ pattern requires `..` due to inaccessible fields | |
13 | ||
14 | // OK: stable field is matched | |
15 | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default(); | |
16 | } |