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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
400 B
Rust
Raw Normal View History

2022-10-12 16:12:19 +00:00
// Test for diagnostic improvement issue #75907, extern crate
// aux-build:issue-75907.rs
extern crate issue_75907 as a;
2021-05-08 08:07:27 +00: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 08:07:27 +00:00
let Foo(x, y, z) = Foo::new();
//~^ ERROR cannot match against a tuple struct which contains private fields
}