rustdoc: Add support for --remap-path-prefix
Adds --remap-path-prefix as an unstable option. This is implemented to mimic the behavior of rustc's --remap-path-prefix but with minor adjustments. This flag similarly takes in two paths, a prefix to replace and a replacement string.
This commit is contained in:
parent
212841e17c
commit
d9f78cb793
11 changed files with 135 additions and 7 deletions
13
tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs
Normal file
13
tests/rustdoc-ui/remap-path-prefix-invalid-doctest.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// FIXME: if/when the output of the test harness can be tested on its own, this test should be
|
||||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
//@ failure-status: 101
|
||||
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
|
||||
//@ rustc-env:RUST_BACKTRACE=0
|
||||
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// doctest fails to compile
|
||||
/// ```
|
||||
/// this is not real code
|
||||
/// ```
|
||||
pub struct SomeStruct;
|
Loading…
Add table
Add a link
Reference in a new issue