rust/tests/ui/privacy/issue-75907_b.rs

15 lines
400 B
Rust
Raw Normal View History

2022-10-12 11:12:19 -05:00
// Test for diagnostic improvement issue #75907, extern crate
// aux-build:issue-75907.rs
extern crate issue_75907 as a;
2021-05-08 03:07:27 -05:00
use a::{make_bar, Bar, Foo};
fn main() {
let Bar(x, y, z) = make_bar();
//~^ ERROR cannot match against a tuple struct which contains private fields
2021-05-08 03:07:27 -05:00
let Foo(x, y, z) = Foo::new();
//~^ ERROR cannot match against a tuple struct which contains private fields
}