You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I go the following error message. Nnotice, there is no error in the output. (I had to cut it in the middle, otherwise github refuse to accept too long post)
vadim@desktop ~/projects/kafka4rust $ cargo fix --edition
Checking kafka4rust v0.1.0 (/home/vadim/projects/kafka4rust)
warning: failed to automatically apply fixes suggested by rustc to crate `kafka4rust`
after fixes were automatically applied the compiler reported errors within these files:
* src/lib.rs
* src/protocol/macros.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/cluster.rs:2:5
|
2 | use broker::Broker;
| ^^^^^^^^^^^^^^ help: use `crate`: `crate::broker::Broker`
|
= note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/cluster.rs:4:5
|
4 | use connection::BrokerConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::connection::BrokerConnection`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/cluster.rs:7:5
|
7 | use protocol::{MetadataRequest0};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::protocol::{MetadataRequest0}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/cluster.rs:8:5
|
8 | use protocol::{write_request, read_response, MetadataResponse0};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::protocol::{write_request, read_response, MetadataResponse0}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/broker.rs:1:5
|
1 | use connection::BrokerConnection;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::connection::BrokerConnection`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/broker.rs:4:5
|
4 | use protocol;
| ^^^^^^^^ help: use `crate`: `crate::protocol`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/connection.rs:9:5
|
9 | use protocol;
| ^^^^^^^^ help: use `crate`: `crate::protocol`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/connection.rs:10:5
|
10 | use protocol::{write_request, read_response};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::protocol::{write_request, read_response}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/protocol/requests.rs:2:5
|
2 | use protocol::responses::*;
| ^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::protocol::responses::*`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/consumer.rs:2:5
|
2 | use cluster::Cluster;
| ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::cluster::Cluster`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/consumer.rs:4:5
|
4 | use protocol;
| ^^^^^^^^ help: use `crate`: `crate::protocol`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: unused `#[macro_use]` import
--> src/lib.rs:23:1
|
23 | #[macro_use] extern crate log;
| ^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/cluster.rs:2:5
|
2 | use broker::Broker;
| ^^^^^^^^^^^^^^ help: use `crate`: `crate::broker::Broker`
|
= note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
...
...
...
...
...
warning: method is never used: `on_message`
--> src/consumer.rs:38:5
|
38 | pub fn on_message(mut self) -> impl Stream<Item=Vec<Message>, Error=()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: method is never used: `connect_brokers`
--> src/consumer.rs:60:5
|
60 | fn connect_brokers(meta: protocol::MetadataResponse0) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: method is never used: `connect_broker`
--> src/consumer.rs:65:5
|
65 | fn connect_broker(broker: &protocol::Broker) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: structure field `correlationId` should have a snake case name such as `correlation_id`
--> src/connection.rs:18:5
|
18 | correlationId: u32,
| ^^^^^^^^^^^^^^^^^^
|
= note: #[warn(non_snake_case)] on by default
Finished dev [unoptimized + debuginfo] target(s) in 0.88s
The text was updated successfully, but these errors were encountered:
Thanks for the report! I've minimized this and I believe it's a case of #5738 where cargo fix is attempting to fix unused variables but the macros in use here mean that the fix is breaking code accidentally.
If you change these two lines to both reference _buff then the fix --edition call will work.
I'm gonna close this in favor of #5738 to centralize discussion, but it'd still be good for us to fix this!
@alexcrichton thank you for looking into it.
I have to note though, that error message was intermittent. I remember seeing it once or twice, but most of the time I could see only warnings but no errors. Would it be another bug?
Project I am trying to upgrade to 2018 edition:
I go the following error message. Nnotice, there is no error in the output. (I had to cut it in the middle, otherwise github refuse to accept too long post)
The text was updated successfully, but these errors were encountered: