0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-25 12:12:19 +01:00

Rollup merge of #130625 - heiseish:issue-124028-fix, r=jieyouxu

Fix a few relative paths in rustc doc

## Changes

- Don't inline the doc for re-exporting some structs that have relative paths in doc.

## Context

See #124028.

- Most of the relative links in rustdoc are there because of circular import (so syntax like `[MyType]: rustc_foo::bar` is difficult to achieve when we cannot import `rustc_xxx` due to circular import)
- Here, I disable new links for re-exports. I think it's fine for re-exported items in `hir::*`.
- There is a few more relative links in other `rustc` crates, however they are not addressed in this PR, as they are not re-exported and/so the relative paths are working.

Closes #124028.

r​? `@fmease`

Let me know if I miss anything or there's any other way to address this issue.
This commit is contained in:
Matthias Krüger 2024-10-10 12:49:18 +02:00 committed by GitHub
commit 6d41be2700
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ pub mod weak_lang_items;
#[cfg(test)]
mod tests;
#[doc(no_inline)]
pub use hir::*;
pub use hir_id::*;
pub use lang_items::{LangItem, LanguageItems};

View File

@ -17,6 +17,7 @@ mod vec;
pub use idx::Idx;
pub use rustc_index_macros::newtype_index;
pub use slice::IndexSlice;
#[doc(no_inline)]
pub use vec::IndexVec;
/// Type size assertion. The first argument is a type and the second argument is its expected size.