Skip to content

Commit 800bc95

Browse files
authored
Rollup merge of #147373 - cyrgani:cyrgani-patch-1, r=ibraheemdev
give a better example why `std` modules named like primitives are needed A small update to the `std` `lib.rs` introduction to replace mentions of `std::i32` (never needed) with `std::char` (sometimes needed). Related to #146882.
2 parents fd6546d + 0bc6945 commit 800bc95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/std/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@
6363
//! type, but not the all-important methods.
6464
//!
6565
//! So for example there is a [page for the primitive type
66-
//! `i32`](primitive::i32) that lists all the methods that can be called on
67-
//! 32-bit integers (very useful), and there is a [page for the module
68-
//! `std::i32`] that documents the constant values [`MIN`] and [`MAX`] (rarely
69-
//! useful).
66+
//! `char`](primitive::char) that lists all the methods that can be called on
67+
//! characters (very useful), and there is a [page for the module
68+
//! `std::char`] that documents iterator and error types created by these methods
69+
//! (rarely useful).
7070
//!
7171
//! Note the documentation for the primitives [`str`] and [`[T]`][prim@slice] (also
7272
//! called 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually

0 commit comments

Comments
 (0)