Bad error message when a weak dep features's depedency is an unused optional dependency #14015
Labels
A-editions
Area: edition-specific issues
A-features
Area: features — conditional compilation
C-bug
Category: bug
S-accepted
Status: Issue or feature is accepted, and has a team member available to help mentor or review
Problem
If nothing can activate an optional dependency, cargo acts as if the dependency doesn't exist which creates poor error messages.
Also, with how things are arranged, the unused optional dependency lint doesn't get reported which could at least reduce the burden on the error message.
Steps
Baseline
Cargo.toml
:Add the following to
Cargo.toml
:Possible Solution(s)
Notes
This came up in discussion in #14010
#14016 covers strong dep features as we likely will want a different solution.
Version
No response
The text was updated successfully, but these errors were encountered: