|
34 | 34 | //! The steps for adding new Cargo.toml syntax are: |
35 | 35 | //! |
36 | 36 | //! 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. |
38 | 38 | //! |
39 | 39 | //! 2. Update the Cargo.toml parsing code to handle your new feature. |
40 | 40 | //! |
|
62 | 62 | //! |
63 | 63 | //! 1. Add the option to the [`CliUnstable`] struct below. Flags can take an |
64 | 64 | //! 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. |
66 | 66 | //! 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. |
71 | 70 | //! |
72 | 71 | //! ## Stabilization |
73 | 72 | //! |
|
78 | 77 | //! |
79 | 78 | //! 1. Update the feature to be stable, based on the kind of feature: |
80 | 79 | //! 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 |
83 | 83 | //! 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 |
87 | 87 | //! necessary. |
88 | 88 | //! 2. Remove `masquerade_as_nightly_cargo` from any tests, and remove |
89 | 89 | //! `cargo-features` from `Cargo.toml` test files if any. You can |
|
92 | 92 | //! 3. Update the docs in unstable.md to move the section to the bottom |
93 | 93 | //! and summarize it similar to the other entries. Update the rest of the |
94 | 94 | //! 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 |
95 | 98 |
|
96 | 99 | use std::collections::BTreeSet; |
97 | 100 | use std::env; |
|
0 commit comments