Releases: natepiano/cargo-mend
Releases · natepiano/cargo-mend
cargo-mend v0.15.5
Fixed
forbidden_pub_cratenow suggestspubinstead ofpub(super)for apub(crate)item that is exposed only structurally through a reachable public signature (e.g. a type returned by apubmethod on a re-exported type); narrowing such an item topub(super)would have introduced aprivate_interfaceserror.- The structural-exposure walk no longer overflows the stack when two public items mention each other in their signatures; visited items are now tracked so the walk terminates.
unused_pubno longer flags a type that a trait impl's interface requires, including impls generated by derives (e.g. bevy'sAsBindGroup); removingpubfrom such a type produced E0446 and madecargo mend --fixroll back.- Fix
--fixrolling back all changes when a call insidemod testswas rewritten with onesuper::too few (prefer_module_import). An inline test module sits one level deeper than the file, so reaching the file's parent requiressuper::super::— the rewrite now adds onesuperper nesting level.
cargo-mend v0.15.4
Fixed
- Disable ANSI color in captured
cargo mendoutput unless color is explicitly forced. prefer_module_importno longer rewrites a function import touse module;when the file already imports that module, which produced a duplicate import (rustc error E0252: the same name imported twice) and forcedcargo mend --fixto roll back; the redundant function import is now deleted instead.
cargo-mend v0.15.3
Fixed
- Fix the install failing to link on Linux with
cannot find -lLLVM-*.build.rsnow points the linker at the toolchain library directory that holds the bundled LLVM.
cargo-mend v0.15.2
Fixed
unused_pubno longer fires on a type reachable only through the return or parameter type of apub(crate)function whose callers live in another module, which madecargo mend --fixremove apubthat the function signature still needs (E0446).
cargo-mend v0.15.1
Fixed
unused_pubno longer fires on a type reachable only through a type alias or another type's public field graph, which madecargo mend --fixremove apubthat apub(crate)alias still needs (E0446).
cargo-mend v0.15.0
Added
- Add
unused_pubto removepubfrom items used only inside their defining module subtree.
Changed
- Show an interactive progress indicator while fix validation output is suppressed.
cargo-mend v0.14.0
Added
- Add
imports_at_topdiagnostic and fix that lifts in-bodyusestatements to the top of their enclosing file or inline module
cargo-mend v0.13.2
Fixed
narrow_to_pub_crateno longer fires on apubitem that is publicly reachable through anotherpubitem's signature (e.g. a struct named in a re-exported enum variant's field type, or in a re-exportedpub const's type). Suggestingpub(crate)for such items would have introduced aprivate_interfaceserror. The check now mirrors rustc's effective-visibility analysis atLevel::Reachable.
cargo-mend v0.13.1
Fixed
- Fix narrow-pub-crate firing on items reached through
pub usewhen the parent file also contained an earlierpub(crate) usefor a sibling
cargo-mend v0.13.0
Changed
narrow_to_pub_cratenow also fires in nested modules: when an item is
barepuband its parent re-exports it aspub(crate) use,cargo mend
suggestspub(crate)and auto-fixes it. The matching definition-site
pub(crate)is now permitted at any depth.