]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/privacy-ns2.stderr
Point at local similarly named element and tweak references to variants
[rust.git] / src / test / ui / privacy / privacy-ns2.stderr
1 error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
2   --> $DIR/privacy-ns2.rs:20:5
3    |
4 LL |     Bar();
5    |     ^^^ not a function, tuple struct or tuple variant
6    |
7 help: possible better candidates are found in other modules, you can import them into scope
8    |
9 LL | use foo1::Bar;
10    |
11 LL | use foo2::Bar;
12    |
13 LL | use foo3::Bar;
14    |
15
16 error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
17   --> $DIR/privacy-ns2.rs:26:5
18    |
19 LL |     pub struct Baz;
20    |     --------------- similarly named unit struct `Baz` defined here
21 ...
22 LL |     Bar();
23    |     ^^^
24    |
25 help: a unit struct with a similar name exists
26    |
27 LL |     Baz();
28    |     ^^^
29 help: possible better candidates are found in other modules, you can import them into scope
30    |
31 LL | use foo1::Bar;
32    |
33 LL | use foo2::Bar;
34    |
35 LL | use foo3::Bar;
36    |
37
38 error[E0573]: expected type, found function `Bar`
39   --> $DIR/privacy-ns2.rs:41:18
40    |
41 LL |     let _x : Box<Bar>;
42    |                  ^^^ not a type
43    |
44 help: possible better candidates are found in other modules, you can import them into scope
45    |
46 LL | use foo1::Bar;
47    |
48 LL | use foo2::Bar;
49    |
50 LL | use foo3::Bar;
51    |
52
53 error[E0573]: expected type, found function `Bar`
54   --> $DIR/privacy-ns2.rs:47:17
55    |
56 LL |     pub struct Baz;
57    |     --------------- similarly named struct `Baz` defined here
58 ...
59 LL |     let _x: Box<Bar>;
60    |                 ^^^
61    |
62 help: a struct with a similar name exists
63    |
64 LL |     let _x: Box<Baz>;
65    |                 ^^^
66 help: possible better candidates are found in other modules, you can import them into scope
67    |
68 LL | use foo1::Bar;
69    |
70 LL | use foo2::Bar;
71    |
72 LL | use foo3::Bar;
73    |
74
75 error[E0603]: trait `Bar` is private
76   --> $DIR/privacy-ns2.rs:60:15
77    |
78 LL |     use foo3::Bar;
79    |               ^^^
80
81 error[E0603]: trait `Bar` is private
82   --> $DIR/privacy-ns2.rs:64:15
83    |
84 LL |     use foo3::Bar;
85    |               ^^^
86
87 error[E0603]: trait `Bar` is private
88   --> $DIR/privacy-ns2.rs:71:16
89    |
90 LL |     use foo3::{Bar,Baz};
91    |                ^^^
92
93 error: aborting due to 7 previous errors
94
95 Some errors have detailed explanations: E0423, E0573, E0603.
96 For more information about an error, try `rustc --explain E0423`.