Skip to content

Commit 0c5ea24

Browse files
committed
Add documentation for hints.mostly-unused
1 parent 1921d09 commit 0c5ea24

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
@@ -963,6 +963,18 @@ introduction of this feature will give an "unused manifest key" warning, but
963963
will otherwise function without erroring. This allows using the hint in a
964964
crate's `Cargo.toml` without mandating the use of a newer Cargo to build it.
965965

966+
A crate can also provide this hint automatically for crates that depend on it,
967+
using the `[hints]` table (which will likewise be ignored by older Cargo):
968+
969+
```toml
970+
[hints]
971+
mostly-unused = true
972+
```
973+
974+
This will cause the crate to default to hint-mostly-unused, unless overridden
975+
via `profile`, which takes precedence, and which can only be specified in the
976+
top-level crate being built.
977+
966978
## rustdoc-map
967979
* Tracking Issue: [#8296](https://github.com/rust-lang/cargo/issues/8296)
968980

0 commit comments

Comments
 (0)