2021-10-27 20:55:44 -04:00
|
|
|
#![feature(unstable_test_feature)]
|
|
|
|
|
|
|
|
|
|
//@ aux-build:unstable.rs
|
|
|
|
|
|
|
|
|
|
extern crate unstable;
|
|
|
|
|
|
|
|
|
|
use unstable::UnstableStruct;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let UnstableStruct { stable, stable2, } = UnstableStruct::default();
|
2025-04-05 19:19:56 +03:00
|
|
|
//~^ ERROR pattern does not mention field `unstable`
|
2021-10-27 20:55:44 -04:00
|
|
|
|
|
|
|
|
let UnstableStruct { stable, unstable, } = UnstableStruct::default();
|
2025-04-05 19:19:56 +03:00
|
|
|
//~^ ERROR pattern does not mention field `stable2`
|
2021-10-27 20:55:44 -04:00
|
|
|
|
|
|
|
|
// OK: stable field is matched
|
|
|
|
|
let UnstableStruct { stable, stable2, unstable } = UnstableStruct::default();
|
|
|
|
|
}
|