Skip to content

Commit 62aff00

Browse files
committed
Add intra links for unstable features doc
1 parent e4a43d9 commit 62aff00

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/cargo/core/features.rs

+14-11
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
//! The steps for adding new Cargo.toml syntax are:
3535
//!
3636
//! 1. Add the cargo-features unstable gate. Search below for "look here" to
37-
//! find the `features!` macro and add your feature to the list.
37+
//! find the `features!` macro invocation and add your feature to the list.
3838
//!
3939
//! 2. Update the Cargo.toml parsing code to handle your new feature.
4040
//!
@@ -62,12 +62,11 @@
6262
//!
6363
//! 1. Add the option to the [`CliUnstable`] struct below. Flags can take an
6464
//! optional value if you want.
65-
//! 2. Update the [`CliUnstable::add`][CliUnstable] function to parse the flag.
65+
//! 2. Update the [`CliUnstable::add`] function to parse the flag.
6666
//! 3. Wherever the new functionality is implemented, call
67-
//! [`Config::cli_unstable`][crate::util::config::Config::cli_unstable] to
68-
//! get an instance of `CliUnstable` and check if the option has been
69-
//! enabled on the `CliUnstable` instance. Nightly gating is already
70-
//! handled, so no need to worry about that.
67+
//! [`Config::cli_unstable`] to get an instance of [`CliUnstable`]
68+
//! and check if the option has been enabled on the [`CliUnstable`] instance.
69+
//! Nightly gating is already handled, so no need to worry about that.
7170
//!
7271
//! ## Stabilization
7372
//!
@@ -78,12 +77,13 @@
7877
//!
7978
//! 1. Update the feature to be stable, based on the kind of feature:
8079
//! 1. `cargo-features`: Change the feature to `stable` in the `features!`
81-
//! macro below, and include the version and a URL for the documentation.
82-
//! 2. `-Z unstable-options`: Find the call to `fail_if_stable_opt` and
80+
//! macro invocation below, and include the version and a URL for the
81+
//! documentation.
82+
//! 2. `-Z unstable-options`: Find the call to [`fail_if_stable_opt`] and
8383
//! remove it. Be sure to update the man pages if necessary.
84-
//! 3. `-Z` flag: Change the parsing code in [`CliUnstable::add`][CliUnstable]
85-
//! to call `stabilized_warn` or `stabilized_err` and remove the field from
86-
//! `CliUnstable. Remove the `(unstable)` note in the clap help text if
84+
//! 3. `-Z` flag: Change the parsing code in [`CliUnstable::add`] to call
85+
//! `stabilized_warn` or `stabilized_err` and remove the field from
86+
//! [`CliUnstable`]. Remove the `(unstable)` note in the clap help text if
8787
//! necessary.
8888
//! 2. Remove `masquerade_as_nightly_cargo` from any tests, and remove
8989
//! `cargo-features` from `Cargo.toml` test files if any. You can
@@ -92,6 +92,9 @@
9292
//! 3. Update the docs in unstable.md to move the section to the bottom
9393
//! and summarize it similar to the other entries. Update the rest of the
9494
//! documentation to add the new feature.
95+
//!
96+
//! [`Config::cli_unstable`]: crate::util::config::Config::cli_unstable
97+
//! [`fail_if_stable_opt`]: CliUnstable::fail_if_stable_opt
9598
9699
use std::collections::BTreeSet;
97100
use std::env;

0 commit comments

Comments
 (0)