]> git.proxmox.com Git - rustc.git/blame - debian/patches/d-bootstrap-cargo-doc-paths.patch
rust-doc: fix references to cargo-doc
[rustc.git] / debian / patches / d-bootstrap-cargo-doc-paths.patch
CommitLineData
d1e0747a
FG
1From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
2Date: Thu, 14 Jul 2022 13:17:39 +0200
3Subject: Fix links to cargo-doc
47372d83 4
d1e0747a
FG
5We package cargo docs in a slightly different location; also tweak linkchecker
6to not fail these links.
7---
d1e0747a
FG
8 .../edition-guide/src/editions/advanced-migrations.md | 14 +++++++-------
9 ...ansitioning-an-existing-project-to-a-new-edition.md | 4 ++--
10 .../src/rust-2021/default-cargo-resolver.md | 10 +++++-----
11 src/doc/index.md | 2 +-
12 src/doc/reference/src/conditional-compilation.md | 2 +-
13 src/doc/reference/src/introduction.md | 4 ++--
14 src/doc/reference/src/linkage.md | 2 +-
15 src/doc/reference/src/procedural-macros.md | 2 +-
16 src/doc/rustc/src/tests/index.md | 4 ++--
17 src/doc/rustc/src/what-is-rustc.md | 2 +-
60275173 18 src/doc/edition-guide/book.toml | 18 +++++++++---------
d1e0747a
FG
19 src/tools/linkchecker/main.rs | 6 ++++++
20 12 files changed, 38 insertions(+), 32 deletions(-)
21
d54e75de
FG
22Index: rust/src/doc/edition-guide/src/editions/advanced-migrations.md
23===================================================================
24--- rust.orig/src/doc/edition-guide/src/editions/advanced-migrations.md
25+++ rust/src/doc/edition-guide/src/editions/advanced-migrations.md
26@@ -186,18 +186,18 @@ Afterwards, the line with `extern crate
1c05d5d1
XL
27
28 We're now more idiomatic, and we didn't have to fix our code manually!
29
30-[`cargo check`]: ../../cargo/commands/cargo-check.html
31-[`cargo fix`]: ../../cargo/commands/cargo-fix.html
dbb31b05
FG
32+[`cargo check`]: ../../../../cargo/book/commands/cargo-check.html
33+[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html
1c05d5d1
XL
34 [`explicit-outlives-requirements`]: ../../rustc/lints/listing/allowed-by-default.html#explicit-outlives-requirements
35 [`keyword-idents`]: ../../rustc/lints/listing/allowed-by-default.html#keyword-idents
36 [`rustfix`]: https://github.com/rust-lang/rustfix
37 [`unused-extern-crates`]: ../../rustc/lints/listing/allowed-by-default.html#unused-extern-crates
38-[Cargo features]: ../../cargo/reference/features.html
39-[Cargo package]: ../../cargo/reference/manifest.html#the-package-section
40-[Cargo targets]: ../../cargo/reference/cargo-targets.html
41-[Cargo workspace]: ../../cargo/reference/workspaces.html
dbb31b05
FG
42+[Cargo features]: ../../../../cargo/book/reference/features.html
43+[Cargo package]: ../../../../cargo/book/reference/manifest.html#the-package-section
44+[Cargo targets]: ../../../../cargo/book/reference/cargo-targets.html
45+[Cargo workspace]: ../../../../cargo/book/reference/workspaces.html
1c05d5d1
XL
46 [CLI flag]: ../../rustc/lints/levels.html#via-compiler-flag
47-[Code generation]: ../../cargo/reference/build-script-examples.html#code-generation
dbb31b05 48+[Code generation]: ../../../../cargo/book/reference/build-script-examples.html#code-generation
1c05d5d1
XL
49 [conditional compilation]: ../../reference/conditional-compilation.html
50 [documentation tests]: ../../rustdoc/documentation-tests.html
51 [JSON messages]: ../../rustc/json.html
d54e75de
FG
52Index: rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
53===================================================================
54--- rust.orig/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
55+++ rust/src/doc/edition-guide/src/editions/transitioning-an-existing-project-to-a-new-edition.md
56@@ -83,7 +83,7 @@ If new warnings are issued, you may want
1c05d5d1
XL
57
58 Congrats! Your code is now valid in both Rust 2015 and Rust 2018!
59
60-[`cargo fix`]: ../../cargo/commands/cargo-fix.html
61-[`cargo test`]: ../../cargo/commands/cargo-test.html
dbb31b05
FG
62+[`cargo fix`]: ../../../../cargo/book/commands/cargo-fix.html
63+[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html
1c05d5d1
XL
64 [Advanced migration strategies]: advanced-migrations.md
65 [nightly channel]: ../../book/appendix-07-nightly-rust.html
d54e75de
FG
66Index: rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
67===================================================================
68--- rust.orig/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
69+++ rust/src/doc/edition-guide/src/rust-2021/default-cargo-resolver.md
70@@ -21,11 +21,11 @@ The new feature resolver no longer merge
1c05d5d1
XL
71 crates that are depended on in multiple ways.
72 See [the announcement of Rust 1.51][5] for details.
73
74-[4]: ../../cargo/reference/resolver.html#feature-resolver-version-2
dbb31b05 75+[4]: ../../../../cargo/book/reference/resolver.html#feature-resolver-version-2
1c05d5d1 76 [5]: https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
f2689c57
FG
77-[workspace]: ../../cargo/reference/workspaces.html
78-[virtual workspace]: ../../cargo/reference/workspaces.html#virtual-manifest
79-[`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions
dbb31b05
FG
80+[workspace]: ../../../../cargo/book/reference/workspaces.html
81+[virtual workspace]: ../../../../cargo/book/reference/workspaces.html#virtual-manifest
82+[`resolver` field]: ../../../../cargo/book/reference/resolver.html#resolver-versions
1c05d5d1
XL
83
84 ## Migration
f2689c57 85
d54e75de 86@@ -176,4 +176,4 @@ This snippet of output shows that the pr
8c7f6774 87 Then, `bar` depends on `bstr` as a build-dependency with the "default" feature.
1c05d5d1
XL
88 We can further see that `bstr`'s "default" feature enables "unicode" (among other features).
89
90-[`cargo tree`]: ../../cargo/commands/cargo-tree.html
dbb31b05 91+[`cargo tree`]: ../../../../cargo/book/commands/cargo-tree.html
d54e75de
FG
92Index: rust/src/doc/index.md
93===================================================================
94--- rust.orig/src/doc/index.md
95+++ rust/src/doc/index.md
96@@ -130,7 +130,7 @@ their differences.
d1e0747a 97
46380cfa 98 ### The Cargo Book
d1e0747a 99
46380cfa 100-[The Cargo Book](cargo/index.html) is a guide to Cargo, Rust's build tool and
dbb31b05 101+[The Cargo Book](../../cargo/book/index.html) is a guide to Cargo, Rust's build tool and
46380cfa 102 dependency manager.
d1e0747a 103
46380cfa 104 ### The Rustdoc Book
d54e75de
FG
105Index: rust/src/doc/reference/src/conditional-compilation.md
106===================================================================
107--- rust.orig/src/doc/reference/src/conditional-compilation.md
108+++ rust/src/doc/reference/src/conditional-compilation.md
109@@ -370,6 +370,6 @@ println!("I'm running on a {} machine!",
d1e0747a
FG
110 [`target_feature` attribute]: attributes/codegen.md#the-target_feature-attribute
111 [attribute]: attributes.md
112 [attributes]: attributes.md
113-[cargo-feature]: ../cargo/reference/features.html
dbb31b05 114+[cargo-feature]: ../../../cargo/book/reference/features.html
d1e0747a
FG
115 [crate type]: linkage.md
116 [static C runtime]: linkage.md#static-and-dynamic-c-runtimes
d54e75de
FG
117Index: rust/src/doc/reference/src/introduction.md
118===================================================================
119--- rust.orig/src/doc/reference/src/introduction.md
120+++ rust/src/doc/reference/src/introduction.md
121@@ -135,8 +135,8 @@ We also want the reference to be as norm
d1e0747a
FG
122 [the Rust Reference repository]: https://github.com/rust-lang/reference/
123 [Unstable Book]: https://doc.rust-lang.org/nightly/unstable-book/
124 [_Expression_]: expressions.md
125-[cargo book]: ../cargo/index.html
126-[cargo reference]: ../cargo/reference/index.html
dbb31b05
FG
127+[cargo book]: ../../../cargo/book/index.html
128+[cargo reference]: ../../../cargo/book/reference/index.html
d1e0747a
FG
129 [expressions chapter]: expressions.html
130 [file an issue]: https://github.com/rust-lang/reference/issues
131 [lifetime of temporaries]: expressions.html#temporaries
d54e75de
FG
132Index: rust/src/doc/reference/src/linkage.md
133===================================================================
134--- rust.orig/src/doc/reference/src/linkage.md
135+++ rust/src/doc/reference/src/linkage.md
d1e0747a
FG
136@@ -201,7 +201,7 @@ fn main() {
137 }
138 ```
139
140-[cargo]: ../cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
dbb31b05 141+[cargo]: ../../../cargo/book/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
d1e0747a
FG
142
143 To use this feature locally, you typically will use the `RUSTFLAGS` environment
144 variable to specify flags to the compiler through Cargo. For example to compile
d54e75de
FG
145Index: rust/src/doc/reference/src/procedural-macros.md
146===================================================================
147--- rust.orig/src/doc/reference/src/procedural-macros.md
148+++ rust/src/doc/reference/src/procedural-macros.md
1c520c88 149@@ -331,7 +331,7 @@ Note that neither declarative nor proced
60275173 150 their equivalent `#[doc = r"str"]` attributes when passed to macros.
d1e0747a
FG
151
152 [Attribute macros]: #attribute-macros
153-[Cargo's build scripts]: ../cargo/reference/build-scripts.html
dbb31b05 154+[Cargo's build scripts]: ../../../cargo/book/reference/build-scripts.html
d1e0747a
FG
155 [Derive macros]: #derive-macros
156 [Function-like macros]: #function-like-procedural-macros
60275173 157 [`Delimiter::None`]: ../proc_macro/enum.Delimiter.html#variant.None
d54e75de
FG
158Index: rust/src/doc/rustc/src/tests/index.md
159===================================================================
160--- rust.orig/src/doc/rustc/src/tests/index.md
161+++ rust/src/doc/rustc/src/tests/index.md
162@@ -301,7 +301,7 @@ Experimental support for using custom te
d1e0747a
FG
163 [`--test` option]: ../command-line-arguments.md#option-test
164 [`-Z panic-abort-tests`]: https://github.com/rust-lang/rust/issues/67650
165 [`available_parallelism`]: ../../std/thread/fn.available_parallelism.html
166-[`cargo test`]: ../../cargo/commands/cargo-test.html
dbb31b05 167+[`cargo test`]: ../../../../cargo/book/commands/cargo-test.html
d1e0747a
FG
168 [`libtest`]: ../../test/index.html
169 [`main` function]: ../../reference/crates-and-source-files.html#main-functions
170 [`Result`]: ../../std/result/index.html
d54e75de 171@@ -311,7 +311,7 @@ Experimental support for using custom te
d1e0747a
FG
172 [attribute-should_panic]: ../../reference/attributes/testing.html#the-should_panic-attribute
173 [attribute-test]: ../../reference/attributes/testing.html#the-test-attribute
174 [bench-docs]: ../../unstable-book/library-features/test.html
175-[Cargo]: ../../cargo/index.html
dbb31b05 176+[Cargo]: ../../../../cargo/book/index.html
d1e0747a
FG
177 [crate type]: ../../reference/linkage.html
178 [custom_test_frameworks documentation]: ../../unstable-book/language-features/custom-test-frameworks.html
179 [nightly channel]: ../../book/appendix-07-nightly-rust.html
d54e75de
FG
180Index: rust/src/doc/rustc/src/what-is-rustc.md
181===================================================================
182--- rust.orig/src/doc/rustc/src/what-is-rustc.md
183+++ rust/src/doc/rustc/src/what-is-rustc.md
184@@ -5,7 +5,7 @@ language, provided by the project itself
d1e0747a
FG
185 produce binary code, either as a library or executable.
186
187 Most Rust programmers don't invoke `rustc` directly, but instead do it through
188-[Cargo](../cargo/index.html). It's all in service of `rustc` though! If you
dbb31b05 189+[Cargo](../../../cargo/book/index.html). It's all in service of `rustc` though! If you
d1e0747a
FG
190 want to see how Cargo calls `rustc`, you can
191
192 ```bash
d54e75de
FG
193Index: rust/src/doc/edition-guide/book.toml
194===================================================================
195--- rust.orig/src/doc/edition-guide/book.toml
196+++ rust/src/doc/edition-guide/book.toml
197@@ -53,15 +53,15 @@ git-repository-url = "https://github.com
60275173
FG
198 "/rust-2018/the-compiler/incremental-compilation-for-faster-compiles.html" = "https://blog.rust-lang.org/2018/02/15/Rust-1.24.html#incremental-compilation"
199 "/rust-2018/the-compiler/an-attribute-for-deprecation.html" = "../../../reference/attributes/diagnostics.html#the-deprecated-attribute"
200 "/rust-2018/rustup-for-managing-rust-versions.html" = "https://rust-lang.github.io/rustup/"
201-"/rust-2018/cargo-and-crates-io/index.html" = "../../../cargo/index.html"
202-"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../cargo/commands/cargo-check.html"
203-"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../cargo/commands/cargo-install.html"
dbb31b05
FG
204+"/rust-2018/cargo-and-crates-io/index.html" = "../../../../../cargo/book/index.html"
205+"/rust-2018/cargo-and-crates-io/cargo-check-for-faster-checking.html" = "../../../../../cargo/book/commands/cargo-check.html"
206+"/rust-2018/cargo-and-crates-io/cargo-install-for-easy-installation-of-tools.html" = "../../../../../cargo/book/commands/cargo-install.html"
60275173
FG
207 "/rust-2018/cargo-and-crates-io/cargo-new-defaults-to-a-binary-project.html" = "https://blog.rust-lang.org/2018/03/29/Rust-1.25.html#cargo-features"
208-"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../cargo/commands/cargo-rustc.html"
209-"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../cargo/reference/workspaces.html"
210-"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../cargo/guide/project-layout.html"
211-"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../cargo/reference/overriding-dependencies.html#the-patch-section"
212-"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../cargo/reference/source-replacement.html"
dbb31b05
FG
213+"/rust-2018/cargo-and-crates-io/cargo-rustc-for-passing-arbitrary-flags-to-rustc.html" = "../../../../../cargo/book/commands/cargo-rustc.html"
214+"/rust-2018/cargo-and-crates-io/cargo-workspaces-for-multi-package-projects.html" = "../../../../../cargo/book/reference/workspaces.html"
215+"/rust-2018/cargo-and-crates-io/multi-file-examples.html" = "../../../../../cargo/book/guide/project-layout.html"
216+"/rust-2018/cargo-and-crates-io/replacing-dependencies-with-patch.html" = "../../../../../cargo/book/reference/overriding-dependencies.html#the-patch-section"
217+"/rust-2018/cargo-and-crates-io/cargo-can-use-a-local-registry-replacement.html" = "../../../../../cargo/book/reference/source-replacement.html"
60275173
FG
218 "/rust-2018/cargo-and-crates-io/crates-io-disallows-wildcard-dependencies.html" = "https://blog.rust-lang.org/2016/01/21/Rust-1.6.html#cratesio-disallows-wildcards"
219 "/rust-2018/documentation/index.html" = "../../../index.html"
220 "/rust-2018/documentation/new-editions-of-the-book.html" = "../../../book/index.html"
d54e75de 221@@ -93,4 +93,4 @@ git-repository-url = "https://github.com
60275173
FG
222 "/rust-next/future.html" = "../../std/future/trait.Future.html"
223 "/rust-next/alloc.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#the-alloc-crate-is-stable"
224 "/rust-next/maybe-uninit.html" = "https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#maybeuninitt-instead-of-memuninitialized"
225-"/rust-next/cargo-vendor.html" = "../../cargo/commands/cargo-vendor.html"
dbb31b05 226+"/rust-next/cargo-vendor.html" = "../../../../cargo/book/commands/cargo-vendor.html"
d54e75de
FG
227Index: rust/src/tools/linkchecker/main.rs
228===================================================================
229--- rust.orig/src/tools/linkchecker/main.rs
230+++ rust/src/tools/linkchecker/main.rs
dbb31b05 231@@ -262,6 +262,10 @@ impl Checker {
d1e0747a
FG
232 return;
233 }
234 }
dbb31b05
FG
235+ if url.contains("../../cargo/book/") {
236+ // link to related cargo-doc, ok for our Debian build
237+ return;
d1e0747a
FG
238+ }
239 if is_exception(file, &target_pretty_path) {
240 report.links_ignored_exception += 1;
241 } else {
bc3792ab
FG
242Index: rust/compiler/rustc_error_codes/src/error_codes/E0462.md
243===================================================================
244--- rust.orig/compiler/rustc_error_codes/src/error_codes/E0462.md
245+++ rust/compiler/rustc_error_codes/src/error_codes/E0462.md
246@@ -26,7 +26,7 @@ prefer `staticlib` for linking with C pr
247 `crate_type`s in [this section of the Reference](../reference/linkage.html).
248
249 This error can be fixed by:
250- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
dbb31b05 251+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
bc3792ab
FG
252 fixing this issue.
253 * Recompiling the crate as a `rlib` or `dylib`; formats suitable for Rust
254 linking.
aafc69ca
FG
255Index: rust/compiler/rustc_error_codes/src/error_codes/E0460.md
256===================================================================
257--- rust.orig/compiler/rustc_error_codes/src/error_codes/E0460.md
258+++ rust/compiler/rustc_error_codes/src/error_codes/E0460.md
259@@ -68,4 +68,4 @@ This error can be fixed by:
260 * Recompiling crate `a` so that both crate `b` and `main` have a uniform
261 version to depend on.
262
263-[Cargo]: ../cargo/index.html
dbb31b05 264+[Cargo]: ../../../cargo/book/index.html
aafc69ca
FG
265Index: rust/compiler/rustc_error_codes/src/error_codes/E0514.md
266===================================================================
267--- rust.orig/compiler/rustc_error_codes/src/error_codes/E0514.md
268+++ rust/compiler/rustc_error_codes/src/error_codes/E0514.md
269@@ -27,7 +27,7 @@ the compiler cannot be sure about *how*
270 versions, and therefore this error occurs.
271
272 This error can be fixed by:
273- * Using [Cargo](../cargo/index.html), the Rust package manager and
dbb31b05 274+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager and
aafc69ca
FG
275 [Rustup](https://rust-lang.github.io/rustup/), the Rust toolchain installer,
276 automatically fixing this issue.
277 * Recompiling the crates with a uniform `rustc` version.
278Index: rust/src/doc/unstable-book/src/compiler-flags/branch-protection.md
279===================================================================
280--- rust.orig/src/doc/unstable-book/src/compiler-flags/branch-protection.md
281+++ rust/src/doc/unstable-book/src/compiler-flags/branch-protection.md
282@@ -15,4 +15,4 @@ For example, `-Z branch-protection=bti,p
283
284 Rust's standard library does not ship with BTI or pointer authentication enabled by default.
285 In Cargo projects the standard library can be recompiled with pointer authentication using the nightly
286-[build-std](../../cargo/reference/unstable.html#build-std) feature.
dbb31b05 287+[build-std](../../../../cargo/book/reference/unstable.html#build-std) feature.
aafc69ca
FG
288Index: rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
289===================================================================
290--- rust.orig/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
291+++ rust/src/doc/unstable-book/src/compiler-flags/control-flow-guard.md
292@@ -39,7 +39,7 @@ It is strongly recommended to also enabl
293
294 To enable CFG in the standard library, use the [cargo `-Z build-std` functionality][build-std] to recompile the standard library with the same configuration options as the main program.
295
296-[build-std]: ../../cargo/reference/unstable.html#build-std
dbb31b05 297+[build-std]: ../../../../cargo/book/reference/unstable.html#build-std
aafc69ca
FG
298
299 For example:
300 ```cmd
301Index: rust/src/doc/unstable-book/src/compiler-flags/sanitizer.md
302===================================================================
303--- rust.orig/src/doc/unstable-book/src/compiler-flags/sanitizer.md
304+++ rust/src/doc/unstable-book/src/compiler-flags/sanitizer.md
fbd32ee8 305@@ -793,7 +793,7 @@ It is strongly recommended to combine sa
aafc69ca
FG
306 instrumented standard library, for example using [cargo `-Zbuild-std`
307 functionality][build-std].
308
309-[build-std]: ../../cargo/reference/unstable.html#build-std
dbb31b05 310+[build-std]: ../../../../cargo/book/reference/unstable.html#build-std
aafc69ca
FG
311
312 # Build scripts and procedural macros
313
314Index: rust/compiler/rustc_error_codes/src/error_codes/E0461.md
315===================================================================
316--- rust.orig/compiler/rustc_error_codes/src/error_codes/E0461.md
317+++ rust/compiler/rustc_error_codes/src/error_codes/E0461.md
318@@ -25,6 +25,6 @@ architectures. This issue also extends t
319 `std` is operating-system specific.
320
321 This error can be fixed by:
322- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
dbb31b05 323+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
aafc69ca
FG
324 fixing this issue.
325 * Recompiling either crate so that they target a consistent target triple.
326Index: rust/compiler/rustc_error_codes/src/error_codes/E0519.md
327===================================================================
328--- rust.orig/compiler/rustc_error_codes/src/error_codes/E0519.md
329+++ rust/compiler/rustc_error_codes/src/error_codes/E0519.md
330@@ -34,7 +34,7 @@ The above example compiles two crates wi
331 impossible for the compiler to distinguish between symbols (`pub` item names).
332
333 This error can be fixed by:
334- * Using [Cargo](../cargo/index.html), the Rust package manager, automatically
dbb31b05 335+ * Using [Cargo](../../../cargo/book/index.html), the Rust package manager, automatically
aafc69ca
FG
336 fixing this issue.
337 * Recompiling the crate with different metadata (different name/
338 `crate_type`).
339Index: rust/src/doc/rustc/src/linker-plugin-lto.md
340===================================================================
341--- rust.orig/src/doc/rustc/src/linker-plugin-lto.md
342+++ rust/src/doc/rustc/src/linker-plugin-lto.md
343@@ -112,7 +112,7 @@ targeting Windows-like targets
344 This is fixed if you explicitly set the target, for example
345 `cargo build --target x86_64-pc-windows-msvc`
346 Without an explicit --target the flags will be passed to all compiler invocations (including build
347-scripts and proc macros), see [cargo docs on rustflags](../cargo/reference/config.html#buildrustflags)
dbb31b05 348+scripts and proc macros), see [cargo docs on rustflags](../../../cargo/book/reference/config.html#buildrustflags)
aafc69ca
FG
349
350 If you have dependencies using the `cc` crate, you will need to set these
351 environment variables:
352Index: rust/src/doc/rustc/src/platform-support/fuchsia.md
353===================================================================
d54e75de
FG
354--- rust.orig/src/doc/rustc/src/platform-support/fuchsia.md
355+++ rust/src/doc/rustc/src/platform-support/fuchsia.md
356@@ -932,7 +932,7 @@ attach and load any relevant debug symbo
aafc69ca
FG
357 [Fuchsia]: https://fuchsia.dev/
358 [source tree]: https://fuchsia.dev/fuchsia-src/get-started/learn/build
359 [rustup]: https://rustup.rs/
360-[cargo]: ../../cargo/index.html
dbb31b05 361+[cargo]: ../../../../cargo/book/index.html
aafc69ca
FG
362 [Fuchsia SDK]: https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core
363 [overview of CML]: https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests
364 [reference for the file format]: https://fuchsia.dev/reference/cml
365Index: rust/src/doc/rustc/src/targets/custom.md
366===================================================================
367--- rust.orig/src/doc/rustc/src/targets/custom.md
368+++ rust/src/doc/rustc/src/targets/custom.md
369@@ -14,4 +14,4 @@ To see it for a different target, add th
370 rustc +nightly -Z unstable-options --target=wasm32-unknown-unknown --print target-spec-json
371 ```
372
373-To use a custom target, see the (unstable) [`build-std` feature](../../cargo/reference/unstable.html#build-std) of `cargo`.
dbb31b05 374+To use a custom target, see the (unstable) [`build-std` feature](../../../../cargo/book/reference/unstable.html#build-std) of `cargo`.