Closed
Description
When I was trying to migrate my crate to reqwest 0.10, there is a confusing compile error stating
error[E0599]: no method named
json
found for typereqwest::async_impl::request::RequestBuilder
in the current scope
I had a brief look at the doc and could still find it. I eventually realized that it requires an additional feature json
(as the doc correctly points out but overlooked by me).
I believe the compiler should have enough information about functions / method / module which are defined behind a feature, so it can probably step in and suggest such feature for this kind of errors so that people don't need to check code or even Cargo.toml
of the crate to know what to do.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Suggestions generated by the compiler applied by `cargo fix`Category: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Relevant to the compiler team, which will review and decide on the PR/issue.