diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index f048fb04af45a..f69efebf5c950 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -250,9 +250,9 @@ bitflags::bitflags! { /// Apply remappings to documentation information const DOCUMENTATION = 1 << 5; - /// An alias for `macro`, `debuginfo` and `coverage`. This ensures all paths in compiled - /// executables, libraries and objects are remapped but not elsewhere. - const OBJECT = Self::MACRO.bits() | Self::DEBUGINFO.bits() | Self::COVERAGE.bits(); + /// An alias for `macro`, `documentation`, `debuginfo` and `coverage`. This ensures all paths in compiled + /// executables, libraries, objects and documentation outputs are remapped but not elsewhere. + const OBJECT = Self::MACRO.bits() | Self::DOCUMENTATION.bits() | Self::DEBUGINFO.bits() | Self::COVERAGE.bits(); } } diff --git a/tests/run-make/remap-path-prefix/rmake.rs b/tests/run-make/remap-path-prefix/rmake.rs index 3b866476e9501..0e4d002e2441c 100644 --- a/tests/run-make/remap-path-prefix/rmake.rs +++ b/tests/run-make/remap-path-prefix/rmake.rs @@ -76,7 +76,7 @@ fn main() { rmeta_contains("auxiliary"); out_diagobj.run(); rmeta_contains("/the/aux/lib.rs"); - rmeta_contains("auxiliary"); + rmeta_not_contains("auxiliary"); out_diagdocobj.run(); rmeta_contains("/the/aux/lib.rs"); rmeta_not_contains("auxiliary"); diff --git a/tests/rustdoc-json/remap-path-prefix/object.rs b/tests/rustdoc-json/remap-path-prefix/object.rs index 052ad7651eeab..18d869580883a 100644 --- a/tests/rustdoc-json/remap-path-prefix/object.rs +++ b/tests/rustdoc-json/remap-path-prefix/object.rs @@ -1,5 +1,6 @@ +//@ ignore-windows //@ compile-flags: --remap-path-prefix={{src-base}}=/remapped //@ compile-flags: --remap-path-scope=object -Zunstable-options -//@ is "$.index[?(@.name=='StrLike')].span.filename" $FILE +//@ is "$.index[?(@.name=='StrLike')].span.filename" \"/remapped/remap-path-prefix/object.rs\" pub trait StrLike {}