E0599 message could be improved for crate version mismatches. · Issue #51458 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@xd009642

Description

@xd009642

I was working on a project where a dependency used a older version of embedded-hal and my project used a newer version. Because of this when I imported the trait OutputPin and tried to use it I got E0599 with the following message:

 help: items from traits can only be used if the trait is in scope
 help: the following trait is implemented but not in scope, perhaps add a `use` for it

However, I had imported the trait the issue was down to the versions not matching up. I also heard some other people had encountered the same confusion with some futures code so it seems this could definitely stand to be made more helpful to users.

EDIT: Looks like after googling this is a known issue and there's been work to improve it i.e. #28300 so feel free to close this if there's already an issue for it I missed!