Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 69fe39e

Browse files
committed
Add primitive documentation to libcore
This works by doing two things: - Adding links that are specific to the crate. Since not all primitive items are defined in `core` (due to lang_items), these need to use relative links and not intra-doc links. - Duplicating `primitive_docs` in both core and std. This allows not needing CARGO_PKG_NAME to build the standard library. It also adds a tidy check to make sure they stay the same.
1 parent 8c2b6ea commit 69fe39e

29 files changed

+1394
-31
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/boxed/struct.Box.html#method.into_raw
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/fs/struct.File.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/io/trait.BufRead.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/io/trait.Read.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/io/trait.Seek.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/io/trait.Write.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/net/trait.ToSocketAddrs.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/process/fn.exit.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../std/string/struct.String.html

library/core/src/bool.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
#[lang = "bool"]
44
impl bool {
5-
/// Returns `Some(t)` if the `bool` is [`true`](keyword.true.html), or `None` otherwise.
5+
/// Returns `Some(t)` if the `bool` is [`true`](../std/keyword.true.html),
6+
/// or `None` otherwise.
67
///
78
/// # Examples
89
///
@@ -18,7 +19,8 @@ impl bool {
1819
if self { Some(t) } else { None }
1920
}
2021

21-
/// Returns `Some(f())` if the `bool` is [`true`](keyword.true.html), or `None` otherwise.
22+
/// Returns `Some(f())` if the `bool` is [`true`](../std/keyword.true.html),
23+
/// or `None` otherwise.
2224
///
2325
/// # Examples
2426
///

0 commit comments

Comments
 (0)