fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
2.9 KiB120 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:43:14
40   |
41LL |     let _x : Bar();
42   |              ^^^^^ not a type
43   |
44help: use `=` if you meant to assign
45   |
46LL |     let _x = Bar();
47   |            ^
48help: possible better candidates are found in other modules, you can import them into scope
49   |
50LL | use foo1::Bar;
51   |
52LL | use foo2::Bar;
53   |
54LL | use foo3::Bar;
55   |
56
57error[E0603]: trait `Bar` is private
58  --> $DIR/privacy-ns2.rs:63:15
59   |
60LL |     use foo3::Bar;
61   |               ^^^ private trait
62   |
63note: the trait `Bar` is defined here
64  --> $DIR/privacy-ns2.rs:55:5
65   |
66LL |     trait Bar {
67   |     ^^^^^^^^^
68
69error[E0603]: trait `Bar` is private
70  --> $DIR/privacy-ns2.rs:67:15
71   |
72LL |     use foo3::Bar;
73   |               ^^^ private trait
74   |
75note: the trait `Bar` is defined here
76  --> $DIR/privacy-ns2.rs:55:5
77   |
78LL |     trait Bar {
79   |     ^^^^^^^^^
80
81error[E0603]: trait `Bar` is private
82  --> $DIR/privacy-ns2.rs:74:16
83   |
84LL |     use foo3::{Bar,Baz};
85   |                ^^^ private trait
86   |
87note: the trait `Bar` is defined here
88  --> $DIR/privacy-ns2.rs:55:5
89   |
90LL |     trait Bar {
91   |     ^^^^^^^^^
92
93error[E0107]: wrong number of const arguments: expected 0, found 1
94  --> $DIR/privacy-ns2.rs:41:18
95   |
96LL |     let _x : Box<Bar>;
97   |                  ^^^ unexpected const argument
98
99error[E0107]: wrong number of type arguments: expected 1, found 0
100  --> $DIR/privacy-ns2.rs:41:14
101   |
102LL |     let _x : Box<Bar>;
103   |              ^^^^^^^^ expected 1 type argument
104
105error[E0107]: wrong number of const arguments: expected 0, found 1
106  --> $DIR/privacy-ns2.rs:49:17
107   |
108LL |     let _x: Box<Bar>;
109   |                 ^^^ unexpected const argument
110
111error[E0107]: wrong number of type arguments: expected 1, found 0
112  --> $DIR/privacy-ns2.rs:49:13
113   |
114LL |     let _x: Box<Bar>;
115   |             ^^^^^^^^ expected 1 type argument
116
117error: aborting due to 10 previous errors
118
119Some errors have detailed explanations: E0107, E0423, E0573, E0603.
120For more information about an error, try `rustc --explain E0107`.