Skip to content

Commit 47a2f14

Browse files
authored
Rollup merge of rust-lang#128736 - GuillaumeGomez:fix-remap-path-prefix, r=notriddle
Fix rustdoc missing handling of remap-path-prefix option Fixes rust-lang#69264. cc `@weihanglo` r? `@notriddle`
2 parents 8912318 + f43e92b commit 47a2f14

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/librustdoc/core.rs

+2
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ pub(crate) fn create_config(
195195
lint_cap,
196196
scrape_examples_options,
197197
expanded_args,
198+
remap_path_prefix,
198199
..
199200
}: RustdocOptions,
200201
RenderOptions { document_private, .. }: &RenderOptions,
@@ -247,6 +248,7 @@ pub(crate) fn create_config(
247248
describe_lints,
248249
crate_name,
249250
test,
251+
remap_path_prefix,
250252
..Options::default()
251253
};
252254

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Regression test for remapped paths in rustdoc errors
2+
// <https://github.com/rust-lang/rust/issues/69264>.
3+
4+
//@ compile-flags:-Z unstable-options --remap-path-prefix={{src-base}}=remapped_path
5+
//@ rustc-env:RUST_BACKTRACE=0
6+
7+
#![deny(rustdoc::invalid_html_tags)]
8+
9+
/// </script>
10+
pub struct Bar;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: unopened HTML tag `script`
2+
--> remapped_path/remap-path-prefix-lint.rs:9:5
3+
|
4+
LL | /// </script>
5+
| ^^^^^^^^^
6+
|
7+
note: the lint level is defined here
8+
--> remapped_path/remap-path-prefix-lint.rs:7:9
9+
|
10+
LL | #![deny(rustdoc::invalid_html_tags)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 1 previous error
14+

0 commit comments

Comments
 (0)