Skip to content

Commit

Permalink
Auto merge of #80181 - jyn514:intra-doc-primitives, r=Manishearth
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Dec 27, 2020
2 parents 76188b6 + 6ac52f0 commit 257becb
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 131 deletions.
5 changes: 3 additions & 2 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
//! [`str`]: prim@str
//! [`mpsc`]: sync::mpsc
//! [`std::cmp`]: cmp
//! [`std::slice`]: slice
//! [`std::slice`]: mod@slice
//! [`use std::env`]: env/index.html
//! [`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html
//! [crates.io]: https://crates.io
Expand All @@ -185,7 +185,8 @@
//! [other]: #what-is-in-the-standard-library-documentation
//! [primitive types]: ../book/ch03-02-data-types.html
//! [rust-discord]: https://discord.gg/rust-lang

#![cfg_attr(not(bootstrap), doc = "[array]: prim@array")]
#![cfg_attr(not(bootstrap), doc = "[slice]: prim@slice")]
#![cfg_attr(not(feature = "restricted-std"), stable(feature = "rust1", since = "1.0.0"))]
#![cfg_attr(feature = "restricted-std", unstable(feature = "restricted_std", issue = "none"))]
#![doc(
Expand Down
Loading

0 comments on commit 257becb

Please sign in to comment.