Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo add rtnetlink then run clippy in an empty new project will fail #32

Open
Sherlock-Holo opened this issue Jul 10, 2023 · 2 comments

Comments

@Sherlock-Holo
Copy link

Sherlock-Holo commented Jul 10, 2023

  1. cargo +stable new --bin ttt
  2. cd ttt
  3. cargo +stable add rtnetlink
  4. cargo +stable clippy

it will fail with

Compiling proc-macro2 v1.0.64
Compiling unicode-ident v1.0.10
Compiling quote v1.0.29
Compiling autocfg v1.1.0
Compiling libc v0.2.147
Compiling futures-core v0.3.28
Compiling futures-task v0.3.28
Compiling memchr v2.5.0
Compiling futures-channel v0.3.28
Compiling thiserror v1.0.43
Compiling anyhow v1.0.71
Compiling paste v1.0.13
Compiling slab v0.4.8
Checking pin-project-lite v0.2.10
Compiling futures-util v0.3.28
Checking futures-sink v0.3.28
Checking pin-utils v0.1.0
Checking futures-io v0.3.28
Checking byteorder v1.4.3
Compiling tokio v1.29.1
Compiling syn v2.0.25
Checking bytes v1.4.0
Checking log v0.4.19
Checking bitflags v1.3.2
Checking static_assertions v1.1.0
Checking cfg-if v1.0.0
Checking mio v0.8.8
Checking socket2 v0.4.9
Checking nix v0.26.2
Compiling thiserror-impl v1.0.43
Compiling futures-macro v0.3.28
Checking netlink-packet-utils v0.5.2
Checking netlink-packet-core v0.7.0
Checking netlink-packet-core v0.5.0
Checking netlink-packet-route v0.15.0
Checking futures-executor v0.3.28
Checking futures v0.3.28
Checking netlink-sys v0.8.5
Checking netlink-proto v0.11.2
Checking rtnetlink v0.12.0
error[E0277]: the trait bound RtnlMessage: netlink_packet_core::traits::NetlinkSerializable is not satisfied
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtnetlink-0.12.0/src/connection.rs:16:5
|
16 | Connection,
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait netlink_packet_core::traits::NetlinkSerializable is not implemented for RtnlMessage
|
note: required by a bound in Connection
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/netlink-proto-0.11.2/src/connection.rs:38:16
|
38 | T: Debug + NetlinkSerializable + NetlinkDeserializable,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in Connection

error[E0277]: the trait bound RtnlMessage: netlink_packet_core::traits::NetlinkDeserializable is not satisfied
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtnetlink-0.12.0/src/connection.rs:16:5
|
16 | Connection,
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait netlink_packet_core::traits::NetlinkDeserializable is not implemented for RtnlMessage
|
note: required by a bound in Connection
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/netlink-proto-0.11.2/src/connection.rs:38:38
|
38 | T: Debug + NetlinkSerializable + NetlinkDeserializable,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in Connection

error[E0277]: the trait bound RtnlMessage: netlink_packet_core::traits::NetlinkSerializable is not satisfied
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtnetlink-0.12.0/src/connection.rs:25:5
|
25 | Connection<RtnlMessage, S>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait netlink_packet_core::traits::NetlinkSerializable is not implemented for RtnlMessage
|
note: required by a bound in Connection
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/netlink-proto-0.11.2/src/connection.rs:38:16
|
38 | T: Debug + NetlinkSerializable + NetlinkDeserializable,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in Connection

error[E0277]: the trait bound RtnlMessage: netlink_packet_core::traits::NetlinkDeserializable is not satisfied
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rtnetlink-0.12.0/src/connection.rs:25:5
|
25 | Connection<RtnlMessage, S>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait netlink_packet_core::traits::NetlinkDeserializable is not implemented for RtnlMessage
|
note: required by a bound in Connection
--> /home/sherlock/.cargo/registry/src/index.crates.io-6f17d22bba15001f/netlink-proto-0.11.2/src/connection.rs:38:38
|
38 | T: Debug + NetlinkSerializable + NetlinkDeserializable,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in Connection

For more information about this error, try rustc --explain E0277.
error: could not compile rtnetlink (lib) due to 4 previous errors

@anlumo
Copy link

anlumo commented Aug 7, 2023

This is caused by an upstream semver violation: rust-netlink/netlink-proto#16

@cathay4t
Copy link
Member

cathay4t commented Feb 1, 2024

This has been solved by rtnetlink 0.14.1 release. Tried your command in my VM, works well.

Could you check it and close the issue if resolved your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants