fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.4 KiB102 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: consider importing this function instead
8   |
9LL + use foo2::Bar;
10   |
11
12error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
13  --> $DIR/privacy-ns2.rs:26:5
14   |
15LL |     pub struct Baz;
16   |     --------------- similarly named unit struct `Baz` defined here
17...
18LL |     Bar();
19   |     ^^^
20   |
21help: a unit struct with a similar name exists
22   |
23LL |     Baz();
24   |     ~~~
25help: consider importing this function instead
26   |
27LL + use foo2::Bar;
28   |
29
30error[E0573]: expected type, found function `Bar`
31  --> $DIR/privacy-ns2.rs:42:14
32   |
33LL |     let _x : Bar();
34   |              ^^^^^ not a type
35   |
36help: use `=` if you meant to assign
37   |
38LL |     let _x = Bar();
39   |            ~
40help: consider importing this trait instead
41   |
42LL + use foo1::Bar;
43   |
44
45error[E0603]: trait `Bar` is private
46  --> $DIR/privacy-ns2.rs:61:15
47   |
48LL |     use foo3::Bar;
49   |               ^^^ private trait
50   |
51note: the trait `Bar` is defined here
52  --> $DIR/privacy-ns2.rs:53:5
53   |
54LL |     trait Bar {
55   |     ^^^^^^^^^
56
57error[E0603]: trait `Bar` is private
58  --> $DIR/privacy-ns2.rs:65:15
59   |
60LL |     use foo3::Bar;
61   |               ^^^ private trait
62   |
63note: the trait `Bar` is defined here
64  --> $DIR/privacy-ns2.rs:53:5
65   |
66LL |     trait Bar {
67   |     ^^^^^^^^^
68
69error[E0603]: trait `Bar` is private
70  --> $DIR/privacy-ns2.rs:72:16
71   |
72LL |     use foo3::{Bar,Baz};
73   |                ^^^ private trait
74   |
75note: the trait `Bar` is defined here
76  --> $DIR/privacy-ns2.rs:53:5
77   |
78LL |     trait Bar {
79   |     ^^^^^^^^^
80
81error[E0747]: constant provided when a type was expected
82  --> $DIR/privacy-ns2.rs:41:18
83   |
84LL |     let _x : Box<Bar>;
85   |                  ^^^
86   |
87   = help: `Bar` is a function item, not a type
88   = help: function item types cannot be named directly
89
90error[E0747]: constant provided when a type was expected
91  --> $DIR/privacy-ns2.rs:48:17
92   |
93LL |     let _x: Box<Bar>;
94   |                 ^^^
95   |
96   = help: `Bar` is a function item, not a type
97   = help: function item types cannot be named directly
98
99error: aborting due to 8 previous errors
100
101Some errors have detailed explanations: E0423, E0573, E0603, E0747.
102For more information about an error, try `rustc --explain E0423`.