Skip to content

Incompatible with prost #4

@palfrey

Description

@palfrey

I'm trying to use this to ignore a field I was previously ignoring with derivative, but this library doesn't seem to support it properly. My use case is ignoring the data field of a prost-generated message, namely pub data: ::debug_ignore::DebugIgnore<::prost::bytes::Bytes>. Doing this gets the error:

error[E0277]: the trait bound `DebugIgnore<prost::bytes::Bytes>: BytesAdapter` is not satisfied
  --> nativelink-proto/genproto/google.bytestream.pb.rs:50:28
   |
50 | #[derive(Clone, PartialEq, ::prost::Message)]
   |                            ^^^^^^^^^^^^^^^^ the trait `BytesAdapter` is not implemented for `DebugIgnore<prost::bytes::Bytes>`
   |
   = help: the following other types implement trait `BytesAdapter`:
             Vec<u8>
             prost::bytes::Bytes
note: required by a bound in `prost::encoding::bytes::encoded_len`
  --> external/rules_rust++crate+crates__prost-0.13.5/src/encoding.rs:743:5
   = note: this error originates in the derive macro `::prost::Message` which comes from the expansion of the macro `length_delimited` (in Nightly builds, run with -Z macro-backtrace for more info)

which is fine without the DebugIgnore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions