Skip to content

Commit 2a687de

Browse files
committed
Move documentation to the unstable book
1 parent ce35f8e commit 2a687de

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

src/doc/rustc/src/command-line-arguments.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,6 @@ replacement is purely textual, with no consideration of the current system's
345345
pathname syntax. For example `--remap-path-prefix foo=bar` will match
346346
`foo/lib.rs` but not `./foo/lib.rs`.
347347

348-
<a id="option-remap-cwd-prefix"></a>
349-
## `--remap-cwd-prefix`: remap paths under the cwd in output
350-
351-
Remap all absolute paths that are rooted under the current working directory to
352-
be under the given value instead. The given value may be absolute or relative,
353-
or empty. This switch takes precidence over `--remap-path-prefix` in case they
354-
would both match a given path.
355-
356-
This flag allows the command line to be universally reproducible, such that the
357-
same execution will work on all machines, regardless of build environment.
358-
359-
This is an unstable option. Use `-Z remap-cwd-prefix=val` to specify a value.
360-
361348
<a id="option-json"></a>
362349
## `--json`: configure json messages printed by the compiler
363350

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# `remap-cwd-prefix`
2+
3+
The tracking issue for this feature is: [#87325](https://github.com/rust-lang/rust/issues/87325).
4+
5+
------------------------
6+
7+
This flag will rewrite absolute paths under the current working directory,
8+
replacing the current working directory prefix with a specified value.
9+
10+
The given value may be absolute or relative, or empty. This switch takes
11+
precidence over `--remap-path-prefix` in case they would both match a given
12+
path.
13+
14+
This flag helps to produce deterministic output, by removing the current working
15+
directory from build output, while allowing the command line to be universally
16+
reproducible, such that the same execution will work on all machines, regardless
17+
of build environment.
18+
19+
## Example
20+
```sh
21+
# This would produce an absolute path to main.rs in build outputs of
22+
# "./main.rs".
23+
rustc -Z remap-cwd-prefix=. main.rs
24+
```

0 commit comments

Comments
 (0)