fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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