Skip to content

Commit 2ff7cc3

Browse files
committed
doc: Add document for Zpublic-dependency
1 parent a4c63fe commit 2ff7cc3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/doc/src/reference/unstable.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,21 @@ The 'public-dependency' feature allows marking dependencies as 'public'
296296
or 'private'. When this feature is enabled, additional information is passed to rustc to allow
297297
the 'exported_private_dependencies' lint to function properly.
298298

299-
This requires the appropriate key to be set in `cargo-features`:
299+
To enable this feature, you can either use `-Zpublic-dependency`
300+
301+
```sh
302+
cargo +nightly run -Zpublic-dependency
303+
```
304+
305+
or `[unstable]` table, for example,
306+
307+
```toml
308+
# .cargo/config.toml
309+
[unstable]
310+
public-dependency = true
311+
```
312+
313+
`public-dependency` could also be enabled in `cargo-features`, **though this is deprecated and will be removed soon**.
300314

301315
```toml
302316
cargo-features = ["public-dependency"]

0 commit comments

Comments
 (0)