blob: 91bc84e70ac5163cb3629585450730ce10e8da6e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
--> $DIR/privacy-ns1.rs:20:5
|
LL | pub struct Baz;
| --------------- similarly named unit struct `Baz` defined here
...
LL | Bar();
| ^^^
|
help: a unit struct with a similar name exists
|
LL | Baz();
| ~~~
help: consider importing this function instead
|
LL | use foo2::Bar;
|
error[E0425]: cannot find function, tuple struct or tuple variant `Bar` in this scope
--> $DIR/privacy-ns1.rs:51:5
|
LL | pub struct Baz;
| --------------- similarly named unit struct `Baz` defined here
...
LL | Bar();
| ^^^
|
help: a unit struct with a similar name exists
|
LL | Baz();
| ~~~
help: consider importing this function
|
LL | use foo2::Bar;
|
error[E0412]: cannot find type `Bar` in this scope
--> $DIR/privacy-ns1.rs:52:17
|
LL | pub struct Baz;
| --------------- similarly named struct `Baz` defined here
...
LL | let _x: Box<Bar>;
| ^^^
|
help: a struct with a similar name exists
|
LL | let _x: Box<Baz>;
| ~~~
help: consider importing this trait
|
LL | use foo1::Bar;
|
error[E0747]: constant provided when a type was expected
--> $DIR/privacy-ns1.rs:35:17
|
LL | let _x: Box<Bar>;
| ^^^
|
= help: `Bar` is a function item, not a type
= help: function item types cannot be named directly
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0412, E0423, E0425, E0747.
For more information about an error, try `rustc --explain E0412`.
|