You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- when your [`package.rust-version`] is too old to use `[lints.cargo]`
168
+
- when your dependency *might* be used to constrain a version on a transitive dependency (instead use `[target."cfg(false)".dependencies]`)
169
+
- when your dependency *might* be used to activate features on a transitive dependency
170
+
- your `[dev-dependencies]` as there is not a way yet to ensure all consumers of these are built
158
171
159
172
When changing code,
160
173
it can be easy to miss that a dependency is no longer used and can be removed.
161
174
162
-
> **Note:** native support for this in Cargo is being tracked in [#15813](https://github.com/rust-lang/cargo/issues/15813).
163
-
164
175
Trade-offs:
165
176
- ✅ Faster full build and link times
166
-
- ❌ May incorrectly flag dependencies as unused or miss some
177
+
- ❌ **Requires using nightly Rust and an [unstable Cargo feature][cargo-lints] when reviewing unused dependencies**
178
+
- ❌ It takes effort to identifier unused dependencies from among the false positives
0 commit comments