File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,13 @@ fn build_feature_map(
304
304
305
305
// Validation of the feature name will be performed in the resolver.
306
306
if !is_any_dep {
307
+ // editon2024 stops expose implicit features, which will strip weak optional dependencies from `dependencies`
308
+ if * weak {
309
+ bail ! (
310
+ "feature `{feature}` includes `{fv}`, activate it in a feature with `dep:{dep_name}` if `{dep_name}` is an enabled dependency"
311
+ ) ;
312
+ }
313
+
307
314
bail ! (
308
315
"feature `{}` includes `{}`, but `{}` is not a dependency" ,
309
316
feature,
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ fn inactive_weak_optional_dep() {
188
188
error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
189
189
190
190
Caused by:
191
- feature `feat` includes `dep?/feat`, but `dep` is not a dependency
191
+ feature `feat` includes `dep?/feat`, activate it in a feature with `dep:dep` if `dep` is an enabled dependency
192
192
" ,
193
193
)
194
194
. run ( ) ;
@@ -221,7 +221,7 @@ Caused by:
221
221
error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
222
222
223
223
Caused by:
224
- feature `feat` includes `dep?/feat`, but `dep` is not a dependency
224
+ feature `feat` includes `dep?/feat`, activate it in a feature with `dep:dep` if `dep` is an enabled dependency
225
225
" ,
226
226
)
227
227
. run ( ) ;
You can’t perform that action at this time.
0 commit comments