Skip to content

Commit 878caf7

Browse files
committed
docs: Surround identifiers in backticks
This was mostly done by clippy via `clippy::doc_markdown`. I then reviewed it to fix words that shouldn't have it or where `--fix` put the backtick in the wrong location.
1 parent 0b28167 commit 878caf7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+128
-128
lines changed

benches/benchsuite/src/bin/capture-last-use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Utility for capturing a global cache last-use database based on the files
22
//! on a real-world system.
33
//!
4-
//! This will look in the CARGO_HOME of the current system and record last-use
4+
//! This will look in the `CARGO_HOME` of the current system and record last-use
55
//! data for all files in the cache. This is intended to provide a real-world
66
//! example for a benchmark that should be close to what a real set of data
77
//! should look like.

crates/cargo-test-support/src/compare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ macro_rules! impl_from_tuple_for_inmemorydir {
621621
};
622622
}
623623

624-
/// Extend `impl_from_tuple_for_inmemorydir`` to generate for the specified tuple and all smaller
624+
/// Extend `impl_from_tuple_for_inmemorydir` to generate for the specified tuple and all smaller
625625
/// tuples
626626
macro_rules! impl_from_tuples_for_inmemorydir {
627627
($var1:ident $path1:ident $data1:ident, $($var:ident $path:ident $data:ident),+) => {

crates/cargo-test-support/src/containers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! with the running container.
66
//!
77
//! Tests using containers must use `#[cargo_test(container_test)]` to disable
8-
//! them unless the CARGO_CONTAINER_TESTS environment variable is set.
8+
//! them unless the `CARGO_CONTAINER_TESTS` environment variable is set.
99
1010
use cargo_util::ProcessBuilder;
1111
use std::collections::HashMap;
@@ -36,7 +36,7 @@ pub struct ContainerHandle {
3636
/// This can only be used on Linux. macOS and Windows docker doesn't allow
3737
/// direct connection to the container.
3838
pub ip_address: String,
39-
/// Port mappings of container_port to host_port for ports exposed via EXPOSE.
39+
/// Port mappings of `container_port` to `host_port` for ports exposed via EXPOSE.
4040
pub port_mappings: HashMap<u16, u16>,
4141
}
4242

crates/cargo-test-support/src/cross_compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Note that cross-testing is very limited. You need to install the
44
//! "alternate" target to the host (32-bit for 64-bit hosts or vice-versa).
55
//!
6-
//! Set CFG_DISABLE_CROSS_TESTS=1 environment variable to disable these tests
6+
//! Set `CFG_DISABLE_CROSS_TESTS=1` environment variable to disable these tests
77
//! if you are unable to use the alternate target. Unfortunately 32-bit
88
//! support on macOS is going away, so macOS users are out of luck.
99
//!

crates/cargo-test-support/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ impl Execs {
890890
///
891891
/// Prefer [`Execs::with_stdout_data`] where possible.
892892
/// - `with` cannot be snapshotted
893-
/// - The absence of `without`` can either mean success or that the string being looked for
893+
/// - The absence of `without` can either mean success or that the string being looked for
894894
/// changed.
895895
///
896896
/// </div>

crates/cargo-test-support/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static CARGO_INTEGRATION_TEST_DIR: &str = "cit";
1717
static GLOBAL_ROOT: OnceLock<Mutex<Option<PathBuf>>> = OnceLock::new();
1818

1919
/// This is used when running cargo is pre-CARGO_TARGET_TMPDIR
20-
/// TODO: Remove when CARGO_TARGET_TMPDIR grows old enough.
20+
/// TODO: Remove when `CARGO_TARGET_TMPDIR` grows old enough.
2121
fn global_root_legacy() -> PathBuf {
2222
let mut path = t!(env::current_exe());
2323
path.pop(); // chop off exe name

crates/cargo-test-support/src/publish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ fn read_new_post(new_path: &Path) -> (Vec<u8>, Vec<u8>) {
166166
///
167167
/// - `expected_crate_name` should be something like `foo-0.0.1.crate`.
168168
/// - `expected_files` should be a complete list of files in the crate
169-
/// (relative to expected_crate_name).
169+
/// (relative to `expected_crate_name`).
170170
/// - `expected_contents` should be a list of `(file_name, contents)` tuples
171171
/// to validate the contents of the given file. Only the listed files will
172172
/// be checked (others will be ignored).

crates/cargo-util-schemas/src/manifest/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ impl<'de> de::Deserialize<'de> for InvalidCargoFeatures {
16801680
}
16811681
}
16821682

1683-
/// A StringOrVec can be parsed from either a TOML string or array,
1683+
/// This can be parsed from either a TOML string or array,
16841684
/// but is always stored as a vector.
16851685
#[derive(Clone, Debug, Serialize, Eq, PartialEq, PartialOrd, Ord)]
16861686
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]

crates/cargo-util/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()>
189189

190190
/// Writes a file to disk atomically.
191191
///
192-
/// write_atomic uses tempfile::persist to accomplish atomic writes.
192+
/// This uses `tempfile::persist` to accomplish atomic writes.
193193
pub fn write_atomic<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()> {
194194
let path = path.as_ref();
195195

crates/home/src/env.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ use std::{
1010
/// in-process unit testing by rustup.
1111
pub trait Env {
1212
/// Return the path to the users home dir, or None if any error occurs:
13-
/// see home_inner.
13+
/// see `home_inner`.
1414
fn home_dir(&self) -> Option<PathBuf>;
1515
/// Return the current working directory.
1616
fn current_dir(&self) -> io::Result<PathBuf>;
17-
/// Get an environment variable, as per std::env::var_os.
17+
/// Get an environment variable, as per `std::env::var_os`.
1818
fn var_os(&self, key: &str) -> Option<OsString>;
1919
}
2020

@@ -47,7 +47,7 @@ pub fn home_dir_with_env(env: &dyn Env) -> Option<PathBuf> {
4747
env.home_dir()
4848
}
4949

50-
/// Variant of cargo_home where the environment source is parameterized. This is
50+
/// Variant of `cargo_home` where the environment source is parameterized. This is
5151
/// specifically to support in-process testing scenarios as environment
5252
/// variables and user home metadata are normally process global state. See the
5353
/// [`Env`] trait.
@@ -56,10 +56,10 @@ pub fn cargo_home_with_env(env: &dyn Env) -> io::Result<PathBuf> {
5656
cargo_home_with_cwd_env(env, &cwd)
5757
}
5858

59-
/// Variant of cargo_home_with_cwd where the environment source is
59+
/// Variant of `cargo_home_with_cwd` where the environment source is
6060
/// parameterized. This is specifically to support in-process testing scenarios
6161
/// as environment variables and user home metadata are normally process global
62-
/// state. See the OsEnv trait.
62+
/// state. See the `OsEnv` trait.
6363
pub fn cargo_home_with_cwd_env(env: &dyn Env, cwd: &Path) -> io::Result<PathBuf> {
6464
match env.var_os("CARGO_HOME").filter(|h| !h.is_empty()) {
6565
Some(home) => {
@@ -76,19 +76,19 @@ pub fn cargo_home_with_cwd_env(env: &dyn Env, cwd: &Path) -> io::Result<PathBuf>
7676
}
7777
}
7878

79-
/// Variant of cargo_home_with_cwd where the environment source is
79+
/// Variant of `cargo_home_with_cwd` where the environment source is
8080
/// parameterized. This is specifically to support in-process testing scenarios
8181
/// as environment variables and user home metadata are normally process global
82-
/// state. See the OsEnv trait.
82+
/// state. See the `OsEnv` trait.
8383
pub fn rustup_home_with_env(env: &dyn Env) -> io::Result<PathBuf> {
8484
let cwd = env.current_dir()?;
8585
rustup_home_with_cwd_env(env, &cwd)
8686
}
8787

88-
/// Variant of cargo_home_with_cwd where the environment source is
88+
/// Variant of `cargo_home_with_cwd` where the environment source is
8989
/// parameterized. This is specifically to support in-process testing scenarios
9090
/// as environment variables and user home metadata are normally process global
91-
/// state. See the OsEnv trait.
91+
/// state. See the `OsEnv` trait.
9292
pub fn rustup_home_with_cwd_env(env: &dyn Env, cwd: &Path) -> io::Result<PathBuf> {
9393
match env.var_os("RUSTUP_HOME").filter(|h| !h.is_empty()) {
9494
Some(home) => {

0 commit comments

Comments
 (0)