blob: b65c801d10e6a3ca85b15893262ec6ea9ecc44df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// run-rustfix
mod a {
pub struct A(pub(self)String);
}
mod b {
use crate::a::A;
pub fn x() {
A("".into()); //~ ERROR cannot initialize a tuple struct which contains private fields
}
}
fn main() {
a::A("a".into()); //~ ERROR tuple struct constructor `A` is private
b::x();
}
|