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

Doctest fails in p2p_proto_derive #2446

Closed
vbar opened this issue Dec 16, 2024 · 0 comments · Fixed by #2447
Closed

Doctest fails in p2p_proto_derive #2446

vbar opened this issue Dec 16, 2024 · 0 comments · Fixed by #2447

Comments

@vbar
Copy link
Contributor

vbar commented Dec 16, 2024

$ cargo test -p p2p_proto_derive --doc
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.14s
   Doc-tests p2p_proto_derive

running 1 test
test crates/p2p_proto_derive/src/lib.rs - get_field_name_in_proto (line 194) ... FAILED

failures:

---- crates/p2p_proto_derive/src/lib.rs - get_field_name_in_proto (line 194) stdout ----
error: cannot find derive macro `ToProtobuf` in this scope
 --> crates/p2p_proto_derive/src/lib.rs:201:10
  |
9 | #[derive(ToProtobuf, TryFromProtobuf)]
  |          ^^^^^^^^^^
  |
help: consider importing this derive macro
  |
3 + use p2p_proto_derive::ToProtobuf;
  |

error: cannot find derive macro `TryFromProtobuf` in this scope
 --> crates/p2p_proto_derive/src/lib.rs:201:22
  |
9 | #[derive(ToProtobuf, TryFromProtobuf)]
  |                      ^^^^^^^^^^^^^^^
  |
help: consider importing this derive macro
  |
3 + use p2p_proto_derive::TryFromProtobuf;
  |

error: cannot find attribute `protobuf` in this scope
  --> crates/p2p_proto_derive/src/lib.rs:202:3
   |
10 | #[protobuf(name = "crate::proto::Y")]
   |   ^^^^^^^^

error: cannot find attribute `rename` in this scope
  --> crates/p2p_proto_derive/src/lib.rs:204:7
   |
12 |     #[rename(original_name)]
   |       ^^^^^^

error: aborting due to 4 previous errors

Couldn't compile the test.

failures:
    crates/p2p_proto_derive/src/lib.rs - get_field_name_in_proto (line 194)

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

error: doctest failed, to rerun pass `-p p2p_proto_derive --doc`
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

Successfully merging a pull request may close this issue.

1 participant