Skip to content

Commit c1d3b8f

Browse files
committed
Add documentation for hints.mostly-unused
1 parent 200322b commit c1d3b8f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/doc/src/reference/unstable.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,18 @@ introduction of this feature will give an "unused manifest key" warning, but
944944
will otherwise function without erroring. This allows using the hint in a
945945
crate's `Cargo.toml` without mandating the use of a newer Cargo to build it.
946946

947+
A crate can also provide this hint automatically for crates that depend on it,
948+
using the `[hints]` table (which will likewise be ignored by older Cargo):
949+
950+
```toml
951+
[hints]
952+
mostly-unused = true
953+
```
954+
955+
This will cause the crate to default to hint-mostly-unused, unless overridden
956+
via `profile`, which takes precedence, and which can only be specified in the
957+
top-level crate being built.
958+
947959
## rustdoc-map
948960
* Tracking Issue: [#8296](https://github.com/rust-lang/cargo/issues/8296)
949961

0 commit comments

Comments
 (0)