diff options
Diffstat (limited to 'tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs')
-rw-r--r-- | tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs b/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs new file mode 100644 index 000000000..d28e17559 --- /dev/null +++ b/tests/ui/typeck/issue-87872-missing-inaccessible-field-pattern.rs @@ -0,0 +1,11 @@ +#![allow(dead_code, unused_variables)] + +pub mod foo { + #[derive(Default)] + pub struct Foo { pub visible: bool, invisible: bool, } +} + +fn main() { + let foo::Foo {} = foo::Foo::default(); + //~^ ERROR pattern does not mention field `visible` and inaccessible fields +} |