Create a minimal, self-contained project that reproduces the bug using cargo new, then add only the code necessary to trigger the error.
- Create a new project with
cargo new minimal-reproand navigate into it. - Add the exact dependencies from your
Cargo.tomlto the new project'sCargo.toml. - Copy only the specific function or module causing the issue into
src/main.rsorsrc/lib.rs. - Run
cargo runorcargo testto confirm the error appears in this isolated environment. - Share the full contents of
Cargo.tomland the modified source file in your bug report.