2019-10-14 17:20:50 -07:00
|
|
|
error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/privacy-ns2.rs:20:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | Bar();
|
2019-10-14 17:20:50 -07:00
|
|
|
| ^^^ not a function, tuple struct or tuple variant
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2020-06-13 20:58:46 +03:00
|
|
|
help: consider importing this function instead
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use foo2::Bar;
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
|
2019-10-14 17:20:50 -07:00
|
|
|
error[E0423]: expected function, tuple struct or tuple variant, found trait `Bar`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/privacy-ns2.rs:26:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-10-14 17:20:50 -07:00
|
|
|
LL | pub struct Baz;
|
|
|
|
| --------------- similarly named unit struct `Baz` defined here
|
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | Bar();
|
2019-01-09 14:11:00 -05:00
|
|
|
| ^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-01-09 14:11:00 -05:00
|
|
|
help: a unit struct with a similar name exists
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | Baz();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~~
|
2020-06-13 20:58:46 +03:00
|
|
|
help: consider importing this function instead
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use foo2::Bar;
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
error[E0573]: expected type, found function `Bar`
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:42:14
|
2019-10-19 10:13:56 -07:00
|
|
|
|
|
|
|
|
LL | let _x : Bar();
|
|
|
|
| ^^^^^ not a type
|
2019-10-26 15:34:28 -07:00
|
|
|
|
|
2019-10-19 10:13:56 -07:00
|
|
|
help: use `=` if you meant to assign
|
|
|
|
|
|
|
|
|
LL | let _x = Bar();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~
|
2020-06-13 20:58:46 +03:00
|
|
|
help: consider importing this trait instead
|
2019-10-19 10:13:56 -07:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + use foo1::Bar;
|
2019-10-19 10:13:56 -07:00
|
|
|
|
|
|
|
|
|
2018-08-08 14:28:26 +02:00
|
|
|
error[E0603]: trait `Bar` is private
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:61:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | use foo3::Bar;
|
2020-03-22 15:36:54 -07:00
|
|
|
| ^^^ private trait
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
note: the trait `Bar` is defined here
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:53:5
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
LL | trait Bar {
|
|
|
|
| ^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0603]: trait `Bar` is private
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:65:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | use foo3::Bar;
|
2020-03-22 15:36:54 -07:00
|
|
|
| ^^^ private trait
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
note: the trait `Bar` is defined here
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:53:5
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
LL | trait Bar {
|
|
|
|
| ^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0603]: trait `Bar` is private
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:72:16
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | use foo3::{Bar,Baz};
|
2020-03-22 15:36:54 -07:00
|
|
|
| ^^^ private trait
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
note: the trait `Bar` is defined here
|
2020-11-13 20:23:37 +01:00
|
|
|
--> $DIR/privacy-ns2.rs:53:5
|
2020-01-12 16:04:03 +03:00
|
|
|
|
|
|
|
|
LL | trait Bar {
|
|
|
|
| ^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-11-13 20:23:37 +01:00
|
|
|
error[E0747]: constant provided when a type was expected
|
2019-11-18 14:57:46 -05:00
|
|
|
--> $DIR/privacy-ns2.rs:41:18
|
|
|
|
|
|
|
|
|
LL | let _x : Box<Bar>;
|
2020-11-13 20:23:37 +01:00
|
|
|
| ^^^
|
2021-04-24 16:25:36 +02:00
|
|
|
|
|
|
|
|
= help: `Bar` is a function item, not a type
|
|
|
|
= help: function item types cannot be named directly
|
2019-11-18 14:57:46 -05:00
|
|
|
|
2020-11-13 20:23:37 +01:00
|
|
|
error[E0747]: constant provided when a type was expected
|
|
|
|
--> $DIR/privacy-ns2.rs:48:17
|
2019-11-18 14:57:46 -05:00
|
|
|
|
|
|
|
|
LL | let _x: Box<Bar>;
|
2020-11-13 20:23:37 +01:00
|
|
|
| ^^^
|
2021-04-24 16:25:36 +02:00
|
|
|
|
|
|
|
|
= help: `Bar` is a function item, not a type
|
|
|
|
= help: function item types cannot be named directly
|
2019-11-18 14:57:46 -05:00
|
|
|
|
2020-11-13 20:23:37 +01:00
|
|
|
error: aborting due to 8 previous errors
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-11-13 20:23:37 +01:00
|
|
|
Some errors have detailed explanations: E0423, E0573, E0603, E0747.
|
|
|
|
For more information about an error, try `rustc --explain E0423`.
|