Skip to content

Commit 3f16597

Browse files
committed
Move to intra doc links whenever possible within std/src/lib.rs
1 parent 3df25ae commit 3f16597

File tree

1 file changed

+27
-40
lines changed

1 file changed

+27
-40
lines changed

library/std/src/lib.rs

+27-40
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
//! * [`std::*` modules](#modules)
2323
//! * [Primitive types](#primitives)
2424
//! * [Standard macros](#macros)
25-
//! * [The Rust Prelude](prelude/index.html)
25+
//! * [The Rust Prelude]
2626
//!
2727
//! If this is your first time, the documentation for the standard library is
2828
//! written to be casually perused. Clicking on interesting things should
@@ -63,8 +63,8 @@
6363
//! So for example there is a [page for the primitive type
6464
//! `i32`](primitive.i32.html) that lists all the methods that can be called on
6565
//! 32-bit integers (very useful), and there is a [page for the module
66-
//! `std::i32`](i32/index.html) that documents the constant values [`MIN`] and
67-
//! [`MAX`](i32/constant.MAX.html) (rarely useful).
66+
//! `std::i32`] that documents the constant values [`MIN`] and [`MAX`] (rarely
67+
//! useful).
6868
//!
6969
//! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also
7070
//! called 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually
@@ -152,48 +152,35 @@
152152
//! contains further primitive shared memory types, including [`atomic`] and
153153
//! [`mpsc`], which contains the channel types for message passing.
154154
//!
155-
//! [I/O]: io/index.html
156-
//! [`MIN`]: i32/constant.MIN.html
157-
//! [TCP]: net/struct.TcpStream.html
158-
//! [The Rust Prelude]: prelude/index.html
159-
//! [UDP]: net/struct.UdpSocket.html
160-
//! [`Arc`]: sync/struct.Arc.html
161-
//! [owned slice]: boxed/index.html
162-
//! [`Cell`]: cell/struct.Cell.html
163-
//! [`FromStr`]: str/trait.FromStr.html
164-
//! [`HashMap<K, V>`]: collections/struct.HashMap.html
165-
//! [`Iterator`]: iter/trait.Iterator.html
166-
//! [`Mutex`]: sync/struct.Mutex.html
167-
//! [`Option<T>`]: option/enum.Option.html
168-
//! [`Rc`]: rc/struct.Rc.html
169-
//! [`RefCell`]: cell/struct.RefCell.html
170-
//! [`Result<T, E>`]: result/enum.Result.html
171-
//! [`String`]: string/struct.String.html
172-
//! [`Vec<T>`]: vec/struct.Vec.html
173-
//! [array]: primitive.array.html
174-
//! [slice]: primitive.slice.html
175-
//! [`atomic`]: sync/atomic/index.html
176-
//! [`collections`]: collections/index.html
155+
//! [I/O]: io
156+
//! [`MIN`]: i32::MIN
157+
//! [`MAX`]: i32::MAX
158+
//! [page for the module `std::i32`]: crate::i32
159+
//! [TCP]: net::TcpStream
160+
//! [The Rust Prelude]: prelude
161+
//! [UDP]: net::UdpSocket
162+
//! [`Arc`]: sync::Arc
163+
//! [owned slice]: boxed
164+
//! [`Cell`]: cell::Cell
165+
//! [`FromStr`]: str::FromStr
166+
//! [`HashMap<K, V>`]: collections::HashMap
167+
//! [`Mutex`]: sync::Mutex
168+
//! [`Option<T>`]: option::Option
169+
//! [`Rc`]: rc::Rc
170+
//! [`RefCell`]: cell::RefCell
171+
//! [`Result<T, E>`]: result::Result
172+
//! [`Vec<T>`]: vec::Vec
173+
//! [`atomic`]: sync::atomic
177174
//! [`for`]: ../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
178-
//! [`format!`]: macro.format.html
179-
//! [`fs`]: fs/index.html
180-
//! [`io`]: io/index.html
181-
//! [`iter`]: iter/index.html
182-
//! [`mpsc`]: sync/mpsc/index.html
183-
//! [`net`]: net/index.html
184-
//! [`option`]: option/index.html
185-
//! [`result`]: result/index.html
186-
//! [`std::cmp`]: cmp/index.html
187-
//! [`std::slice`]: slice/index.html
188-
//! [`str`]: primitive.str.html
189-
//! [`sync`]: sync/index.html
190-
//! [`thread`]: thread/index.html
175+
//! [`mpsc`]: sync::mpsc
176+
//! [`std::cmp`]: cmp
177+
//! [`std::slice`]: slice
191178
//! [`use std::env`]: env/index.html
192179
//! [`use`]: ../book/ch07-02-defining-modules-to-control-scope-and-privacy.html
193180
//! [crates.io]: https://crates.io
194181
//! [deref-coercions]: ../book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods
195-
//! [files]: fs/struct.File.html
196-
//! [multithreading]: thread/index.html
182+
//! [files]: fs::File
183+
//! [multithreading]: thread
197184
//! [other]: #what-is-in-the-standard-library-documentation
198185
//! [primitive types]: ../book/ch03-02-data-types.html
199186
//! [rust-discord]: https://discord.gg/rust-lang

0 commit comments

Comments
 (0)