diff --git a/crates/build-rs/src/output.rs b/crates/build-rs/src/output.rs index 963a073ead2..ed338696d65 100644 --- a/crates/build-rs/src/output.rs +++ b/crates/build-rs/src/output.rs @@ -119,6 +119,8 @@ pub fn rustc_link_arg_bins(flag: &str) { /// The `rustc-link-arg-tests` instruction tells Cargo to pass the /// [`-C link-arg=FLAG` option][link-arg] to the compiler, but only when building /// a tests target. +/// +/// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg #[track_caller] pub fn rustc_link_arg_tests(flag: &str) { if flag.contains([' ', '\n']) { @@ -130,6 +132,8 @@ pub fn rustc_link_arg_tests(flag: &str) { /// The `rustc-link-arg-examples` instruction tells Cargo to pass the /// [`-C link-arg=FLAG` option][link-arg] to the compiler, but only when building /// an examples target. +/// +/// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg #[track_caller] pub fn rustc_link_arg_examples(flag: &str) { if flag.contains([' ', '\n']) { @@ -141,6 +145,8 @@ pub fn rustc_link_arg_examples(flag: &str) { /// The `rustc-link-arg-benches` instruction tells Cargo to pass the /// [`-C link-arg=FLAG` option][link-arg] to the compiler, but only when building /// a benchmark target. +/// +/// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg #[track_caller] pub fn rustc_link_arg_benches(flag: &str) { if flag.contains([' ', '\n']) { diff --git a/src/cargo/core/compiler/rustdoc.rs b/src/cargo/core/compiler/rustdoc.rs index 231d84d651a..6f5d0037e48 100644 --- a/src/cargo/core/compiler/rustdoc.rs +++ b/src/cargo/core/compiler/rustdoc.rs @@ -243,7 +243,7 @@ pub fn add_root_urls( } /// Adds unstable flag [`--output-format`][1] to the given `rustdoc` -/// invocation. This is for unstable feature [`-Zunstable-features`]. +/// invocation. This is for unstable feature `-Zunstable-features`. /// /// [1]: https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html?highlight=output-format#-w--output-format-output-format pub fn add_output_format( diff --git a/src/cargo/util/context/mod.rs b/src/cargo/util/context/mod.rs index 73125580045..500230593ce 100644 --- a/src/cargo/util/context/mod.rs +++ b/src/cargo/util/context/mod.rs @@ -1982,7 +1982,7 @@ impl GlobalContext { Ok(()) } - /// Returns a list of [target.'`cfg()`'] tables. + /// Returns a list of `target.'cfg()'` tables. /// /// The list is sorted by the table name. pub fn target_cfgs(&self) -> CargoResult<&Vec<(String, TargetCfgConfig)>> {