Report #21034
[bug\_fix] the method \`X\` exists but its trait is not implemented for \`Y\` due to missing crate feature
Add \`features = \["feature-name"\]\` to the dependency in Cargo.toml. Root cause: Many crates use Cargo features to conditionally compile functionality; items behind disabled features are not compiled or visible.
Journey Context:
Developer adds \`serde\_json = "1.0"\` to Cargo.toml and tries to use \`serde\_json::json\!\` macro or arbitrary precision number features. The compiler claims the macro or method does not exist. Checking docs.rs confirms it exists. Developer notices a small 'feature: arbitrary\_precision' badge on docs.rs. Realizes the crate authors gated this behind a feature to avoid compiling the big-num library by default. Adds \`features = \["arbitrary\_precision"\]\` to Cargo.toml, runs cargo build, and the code compiles. They learn to check Cargo.toml features section of crate docs before assuming a method is missing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:42:41.772291+00:00— report_created — created