Rollup merge of #150761 - patch-1, r=wesleywiser

rustc book: fix grammar
This commit is contained in:
Jakub Beránek 2026-01-07 23:15:51 +01:00 committed by GitHub
commit dbf905fea9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,7 @@
`rustc` supports remapping source paths prefixes **as a best effort** in all compiler generated
output, including compiler diagnostics, debugging information, macro expansions, etc.
This is useful for normalizing build products, for example by removing the current directory
This is useful for normalizing build products, for example, by removing the current directory
out of the paths emitted into object files.
The remapping is done via the `--remap-path-prefix` option.
@ -41,7 +41,7 @@ This example replaces all occurrences of `/home/user/project` in emitted paths w
## Caveats and Limitations
### Linkers generated paths
### Paths generated by linkers
On some platforms like `x86_64-pc-windows-msvc`, the linker may embed absolute host paths and compiler
arguments into debug info files (like `.pdb`) independently of `rustc`.
@ -54,7 +54,7 @@ The `--remap-path-prefix` option does not affect these linker-generated paths.
### Textual replacement only
The remapping is strictly textual and does not account for different path separator conventions across
platforms. Care must be taken when specifying prefixes, especially on Windows where both `/` and `\` may
platforms. Care must be taken when specifying prefixes, especially on Windows, where both `/` and `\` may
appear in paths.
### External tools