Skip to content

Commit b1c02ae

Browse files
committed
fix: Focus existing edition behavior on goal and list contingency
1 parent fa464d1 commit b1c02ae

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

text/3491-remove-implicit-features.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,17 @@ feature is enabled.
6767

6868
## Existing editions
6969

70-
For existing editions, `cargo` will warn when parsing a workspace member's
71-
package when an optional dependency is not referenced via `dep:` in the
72-
features ([rust-lang/cargo#9088](https://github.com/rust-lang/cargo/issues/9088)) using the
73-
planned warning control system ([rust-lang/cargo#12235](https://github.com/rust-lang/cargo/issues/12235)).
70+
As is expected for edition changes, `cargo fix --edition` will add `foo = ["dep:foo"]` features as needed.
71+
Where undesired, users can remove these and switch their references to the
72+
dependency from `foo` to `dep:foo`,
73+
dealing with the [potential breaking changes](https://doc.rust-lang.org/cargo/reference/semver.html#cargo-remove-opt-dep).
74+
75+
Ideally, this will be accomplished by `cargo` emitting an allow-by-defaylt
76+
warning when parsing a workspace member's package when an optional dependency
77+
is not referenced via `dep:` in the features
78+
([rust-lang/cargo#9088](https://github.com/rust-lang/cargo/issues/9088))
79+
using the planned warning control system
80+
([rust-lang/cargo#12235](https://github.com/rust-lang/cargo/issues/12235)).
7481
The warning will be named something like `cargo::implicit_feature` and be part
7582
of the `cargo::rust-202X-compatibility` group.
7683

@@ -80,6 +87,8 @@ implicit features for optional dependencies is deprecated and will be unavailabl
8087
```
8188
This would be machine applicable with a suggestion to add `foo = ["dep:foo"]`. `cargo fix` would then insert this feature.
8289

90+
If that system is not ready in time, we can always hard code the change in `cargo fix`.
91+
8392
## Next edition
8493

8594
On the next edition, this warning will be a hard error.

0 commit comments

Comments
 (0)