Skip to content

error messages include paths that cannot possibly resolve when used #38283

Closed
@whitequark

Description

@whitequark

E.g. let's say in src/wire/mod.rs I have:

pub use self::arp::Packet as ArpPacket;

If I now misuse a value of this type, I get an error like this:

error[E0277]: the trait bound `smoltcp::wire::Packet<&[u8]>: std::fmt::Display` is not satisfied
  --> examples/smoltcpdump.rs:22:28
   |
22 |             println!("{}", packet);
   |                            ^^^^^^ the trait `std::fmt::Display` is not implemented for `smoltcp::wire::Packet<&[u8]>`
   |
   = note: `smoltcp::wire::Packet<&[u8]>` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string
   = note: required by `std::fmt::Display::fmt`

which of course does not refer to a path that exists.

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