Skip to content

Commit 866095b

Browse files
committed
Add stable documentation for the [hints] table
1 parent fe86023 commit 866095b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/doc/src/reference/manifest.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Every manifest file consists of the following sections:
5050
* [`[badges]`](#the-badges-section) --- Badges to display on a registry.
5151
* [`[features]`](features.md) --- Conditional compilation features.
5252
* [`[lints]`](#the-lints-section) --- Configure linters for this package.
53+
* [`[hints]`](#the-hints-section) --- Provide hints for compiling this package.
5354
* [`[patch]`](overriding-dependencies.md#the-patch-section) --- Override dependencies.
5455
* [`[replace]`](overriding-dependencies.md#the-replace-section) --- Override dependencies (deprecated).
5556
* [`[profile]`](profiles.md) --- Compiler settings and optimizations.
@@ -565,6 +566,27 @@ As for dependents, Cargo suppresses lints from non-path dependencies with featur
565566

566567
> **MSRV:** Respected as of 1.74
567568
569+
## The `[hints]` section
570+
571+
The `[hints]` section allows specifying hints for compiling this package. Cargo
572+
will respect these hints by default when compiling this package, though the
573+
top-level package being built can override these values through the `[profile]`
574+
mechanism. Hints are, by design, always safe for Cargo to ignore; if Cargo
575+
encounters a hint it doesn't understand, or a hint it understands but with a
576+
value it doesn't understand, it will warn, but not error.
577+
578+
Individual hints may have an associated unstable feature gate that you need to
579+
pass in order to apply the configuration they specify, but if you don't specify
580+
that unstable feature gate, you will again get only a warning, not an error.
581+
582+
There are no stable hints at this time. See the [hint-mostly-unused
583+
documentation](unstable.md#profile-hint-mostly-unused-option) for information
584+
on an unstable hint.
585+
586+
> **MSRV:** Respected as of 1.90. However, specifying hints in a crate does not
587+
> impact the MSRV of the crate. Older versions of Cargo will ignore hints with
588+
> a warning, but will not error.
589+
568590
## The `[badges]` section
569591

570592
The `[badges]` section is for specifying status badges that can be displayed

0 commit comments

Comments
 (0)