Skip to content

Commit 257becb

Browse files
committed
Auto merge of #80181 - jyn514:intra-doc-primitives, r=Manishearth
Fix intra-doc links for non-path primitives This does *not* currently work for associated items that are auto-implemented by the compiler (e.g. `never::eq`), because they aren't present in the source code. I plan to fix this in a follow-up PR. Fixes #63351 using the approach mentioned in #63351 (comment). r? `@Manishearth` cc `@petrochenkov` - this makes `rustc_resolve::Res` public, is that ok? I'd just add an identical type alias in rustdoc if not, which seems a waste.
2 parents 76188b6 + 6ac52f0 commit 257becb

File tree

5 files changed

+322
-131
lines changed

5 files changed

+322
-131
lines changed

library/std/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
//! [`str`]: prim@str
176176
//! [`mpsc`]: sync::mpsc
177177
//! [`std::cmp`]: cmp
178-
//! [`std::slice`]: slice
178+
//! [`std::slice`]: mod@slice
179179
//! [`use std::env`]: env/index.html
180180
//! [`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html
181181
//! [crates.io]: https://crates.io
@@ -185,7 +185,8 @@
185185
//! [other]: #what-is-in-the-standard-library-documentation
186186
//! [primitive types]: ../book/ch03-02-data-types.html
187187
//! [rust-discord]: https://discord.gg/rust-lang
188-
188+
#![cfg_attr(not(bootstrap), doc = "[array]: prim@array")]
189+
#![cfg_attr(not(bootstrap), doc = "[slice]: prim@slice")]
189190
#![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
190191
#![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
191192
#![doc(

0 commit comments

Comments
 (0)