]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/privacy-struct-ctor.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / resolve / privacy-struct-ctor.stderr
1 error[E0423]: expected value, found struct `Z`
2   --> $DIR/privacy-struct-ctor.rs:30:9
3    |
4 LL |         Z;
5    |         ^
6    |         |
7    |         did you mean `S`?
8    |         constructor is not visible here due to private fields
9 help: possible better candidate is found in another module, you can import it into scope
10    |
11 LL |     use m::n::Z;
12    |
13
14 error[E0423]: expected value, found struct `S`
15   --> $DIR/privacy-struct-ctor.rs:43:5
16    |
17 LL |     S;
18    |     ^ constructor is not visible here due to private fields
19 help: possible better candidate is found in another module, you can import it into scope
20    |
21 LL | use m::S;
22    |
23
24 error[E0423]: expected value, found struct `S2`
25   --> $DIR/privacy-struct-ctor.rs:48:5
26    |
27 LL |     S2;
28    |     ^^ did you mean `S2 { /* fields */ }`?
29
30 error[E0423]: expected value, found struct `xcrate::S`
31   --> $DIR/privacy-struct-ctor.rs:53:5
32    |
33 LL |     xcrate::S;
34    |     ^^^^^^^^^ constructor is not visible here due to private fields
35 help: possible better candidate is found in another module, you can import it into scope
36    |
37 LL | use m::S;
38    |
39
40 error[E0603]: tuple struct `Z` is private
41   --> $DIR/privacy-struct-ctor.rs:28:9
42    |
43 LL |         n::Z;
44    |         ^^^^
45
46 error[E0603]: tuple struct `S` is private
47   --> $DIR/privacy-struct-ctor.rs:39:5
48    |
49 LL |     m::S;
50    |     ^^^^
51
52 error[E0603]: tuple struct `S` is private
53   --> $DIR/privacy-struct-ctor.rs:41:16
54    |
55 LL |     let _: S = m::S(2);
56    |                ^^^^
57
58 error[E0603]: tuple struct `Z` is private
59   --> $DIR/privacy-struct-ctor.rs:45:5
60    |
61 LL |     m::n::Z;
62    |     ^^^^^^^
63
64 error[E0603]: tuple struct `S` is private
65   --> $DIR/privacy-struct-ctor.rs:51:5
66    |
67 LL |     xcrate::m::S;
68    |     ^^^^^^^^^^^^
69
70 error[E0603]: tuple struct `Z` is private
71   --> $DIR/privacy-struct-ctor.rs:55:5
72    |
73 LL |     xcrate::m::n::Z;
74    |     ^^^^^^^^^^^^^^^
75
76 error: aborting due to 10 previous errors
77
78 Some errors occurred: E0423, E0603.
79 For more information about an error, try `rustc --explain E0423`.