Skip to content

docs(build-rs): Fix broken intra-doc links #15810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/build-rs/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand All @@ -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']) {
Expand All @@ -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']) {
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/core/compiler/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/util/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)>> {
Expand Down
Loading