From a9262d5d5343de57aaa85a4fdc2c93365cbff8d7 Mon Sep 17 00:00:00 2001 From: Timo Lang Date: Thu, 7 Aug 2025 10:09:12 +0200 Subject: [PATCH] docs: clarify that `cargo:rustc-link-arg-tests` only applies to integration tests --- crates/build-rs/src/output.rs | 2 +- src/doc/src/reference/build-scripts.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/build-rs/src/output.rs b/crates/build-rs/src/output.rs index ed338696d65..6ff819db2d3 100644 --- a/crates/build-rs/src/output.rs +++ b/crates/build-rs/src/output.rs @@ -118,7 +118,7 @@ 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. +/// an integration test target. /// /// [link-arg]: https://doc.rust-lang.org/rustc/codegen-options/index.html#link-arg #[track_caller] diff --git a/src/doc/src/reference/build-scripts.md b/src/doc/src/reference/build-scripts.md index ac18b365d22..8920c0bf1d5 100644 --- a/src/doc/src/reference/build-scripts.md +++ b/src/doc/src/reference/build-scripts.md @@ -174,8 +174,8 @@ to set a linker script or other linker options. ### `cargo::rustc-link-arg-tests=FLAG` {#rustc-link-arg-tests} 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=FLAG` option][link-arg] to the compiler, but only when building an integration +test target. ### `cargo::rustc-link-arg-examples=FLAG` {#rustc-link-arg-examples}