Skip to content

Commit 236ee3d

Browse files
committed
Auto merge of #12049 - lukas-code:fix-doc-markdown, r=weihanglo
fix broken markdown in docs ### What does this PR try to resolve? This PR fixes some broken markdown in doc comments. ### How should we test and review this PR? 1. Navigate to the online docs and observe broken markdown: * https://doc.rust-lang.org/nightly/nightly-rustc/cargo/index.html * https://doc.rust-lang.org/nightly/nightly-rustc/cargo/core/compiler/struct.TargetInfo.html#structfield.crate_types * https://doc.rust-lang.org/nightly/nightly-rustc/cargo/sources/registry/struct.RegistryConfig.html#structfield.dl * https://doc.rust-lang.org/nightly/nightly-rustc/cargo/sources/registry/fn.max_unpack_size.html 2. Run `cargo doc --document-private-items --open` and verify that the broken markdown has been fixed. ### Additional information The broken inline code was found by a [new rustdoc lint](rust-lang/rust#105848) and these changes will be required to deny the lint in the rust-lang/rust repository.
2 parents 923d530 + af776ae commit 236ee3d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/cargo/core/compiler/build_context/target_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct TargetInfo {
3939
///
4040
/// The key is the crate type name (like `cdylib`) and the value is
4141
/// `Some((prefix, suffix))`, for example `libcargo.so` would be
42-
/// `Some(("lib", ".so")). The value is `None` if the crate type is not
42+
/// `Some(("lib", ".so"))`. The value is `None` if the crate type is not
4343
/// supported.
4444
crate_types: RefCell<HashMap<CrateType, Option<(String, String)>>>,
4545
/// `cfg` information extracted from `rustc --print=cfg`.

src/cargo/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//! - [`core::compiler`]:
3838
//! This is the code responsible for running `rustc` and `rustdoc`.
3939
//! - [`core::compiler::build_context`]:
40-
//! The [`BuildContext`]['core::compiler::BuildContext] is the result of the "front end" of the
40+
//! The [`BuildContext`][core::compiler::BuildContext] is the result of the "front end" of the
4141
//! build process. This contains the graph of work to perform and any settings necessary for
4242
//! `rustc`. After this is built, the next stage of building is handled in
4343
//! [`Context`][core::compiler::Context].

src/cargo/sources/registry/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub struct RegistryConfig {
241241
/// crate's sha256 checksum.
242242
///
243243
/// For backwards compatibility, if the string does not contain any
244-
/// markers (`{crate}`, `{version}`, `{prefix}`, or ``{lowerprefix}`), it
244+
/// markers (`{crate}`, `{version}`, `{prefix}`, or `{lowerprefix}`), it
245245
/// will be extended with `/{crate}/{version}/download` to
246246
/// support registries like crates.io which were created before the
247247
/// templating setup was created.
@@ -945,7 +945,7 @@ impl<'cfg> Source for RegistrySource<'cfg> {
945945
}
946946

947947
/// Get the maximum upack size that Cargo permits
948-
/// based on a given `size of your compressed file.
948+
/// based on a given `size` of your compressed file.
949949
///
950950
/// Returns the larger one between `size * max compression ratio`
951951
/// and a fixed max unpacked size.

0 commit comments

Comments
 (0)