Skip to content

Commit f027b3d

Browse files
Update posts/2022-04-07-Rust-1.60.0.md
Co-authored-by: Ryan Levick <[email protected]>
1 parent 01a16a6 commit f027b3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2022-04-07-Rust-1.60.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ There are two things to note in this example:
9090
* The optional dependency `jpeg-decoder` implicitly defines a feature of the same name. Enabling the `jpeg-decoder` feature will enable the `jpeg-decoder` dependency.
9191
* The `"jpeg-decoder/rayon"` syntax enables the `jpeg-decoder` dependency *and* enables the `jpeg-decoder` dependency's `rayon` feature.
9292

93-
Namespaced features tackles the first issue that optional dependencies are implicitly exposed as part of a package's public interface. You can now use the `dep:` prefix in the `[features]` table to explicitly refer to an optional dependency. This gives you more control to define the feature corresponding to the optional dependency, and to hide optional dependencies behind more descriptive feature names.
93+
Namespaced features tackles the first issue. You can now use the `dep:` prefix in the `[features]` table to explicitly refer to an optional dependency without implicitly exposing it as a feature. This gives you more control on how to define the feature corresponding to the optional dependency including hiding optional dependencies behind more descriptive feature names.
9494

9595
Weak dependency features tackles the second issue where the `"package-name/feature-name"` syntax would enable `package-name` if it is an optional dependency. Often this is not what you want, and starting in 1.60, you can add a ? as in `"package-name?/feature-name"` which will only enable the given feature if something else enables the optional dependency.
9696

0 commit comments

Comments
 (0)