Skip to content

Commit 3589509

Browse files
committed
Add intra-doc links for features! macro
1 parent 677205c commit 3589509

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/cargo/core/features.rs

Lines changed: 6 additions & 4 deletions
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 invocation 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
//!
@@ -76,7 +76,7 @@
7676
//! The steps for stabilizing are roughly:
7777
//!
7878
//! 1. Update the feature to be stable, based on the kind of feature:
79-
//! 1. `cargo-features`: Change the feature to `stable` in the `features!`
79+
//! 1. `cargo-features`: Change the feature to `stable` in the [`features!`]
8080
//! macro invocation below, and include the version and a URL for the
8181
//! documentation.
8282
//! 2. `-Z unstable-options`: Find the call to [`fail_if_stable_opt`] and
@@ -95,6 +95,7 @@
9595
//!
9696
//! [`Config::cli_unstable`]: crate::util::config::Config::cli_unstable
9797
//! [`fail_if_stable_opt`]: CliUnstable::fail_if_stable_opt
98+
//! [`features!`]: macro.features.html
9899
99100
use std::collections::BTreeSet;
100101
use std::env;
@@ -126,7 +127,7 @@ pub const SEE_CHANNELS: &str =
126127
/// - Update the [`FromStr`] impl.
127128
/// - Update [`CLI_VALUES`] to include the new edition.
128129
/// - Set [`LATEST_UNSTABLE`] to Some with the new edition.
129-
/// - Add an unstable feature to the `features!` macro invocation below for the new edition.
130+
/// - Add an unstable feature to the [`features!`] macro invocation below for the new edition.
130131
/// - Gate on that new feature in [`TomlManifest::to_real_manifest`].
131132
/// - Update the shell completion files.
132133
/// - Update any failing tests (hopefully there are very few).
@@ -137,7 +138,7 @@ pub const SEE_CHANNELS: &str =
137138
/// - Set [`LATEST_UNSTABLE`] to None.
138139
/// - Set [`LATEST_STABLE`] to the new version.
139140
/// - Update [`is_stable`] to `true`.
140-
/// - Set the editionNNNN feature to stable in the `features!` macro invocation below.
141+
/// - Set the editionNNNN feature to stable in the [`features!`] macro invocation below.
141142
/// - Update any tests that are affected.
142143
/// - Update the man page for the `--edition` flag.
143144
/// - Update unstable.md to move the edition section to the bottom.
@@ -155,6 +156,7 @@ pub const SEE_CHANNELS: &str =
155156
/// [this example]: https://github.com/rust-lang/cargo/blob/3ebb5f15a940810f250b68821149387af583a79e/src/doc/src/reference/unstable.md?plain=1#L1238-L1264
156157
/// [`is_stable`]: Edition::is_stable
157158
/// [`TomlManifest::to_real_manifest`]: crate::util::toml::TomlManifest::to_real_manifest
159+
/// [`features!`]: macro.features.html
158160
#[derive(Clone, Copy, Debug, Hash, PartialOrd, Ord, Eq, PartialEq, Serialize, Deserialize)]
159161
pub enum Edition {
160162
/// The 2015 edition

0 commit comments

Comments
 (0)