give a better example why std modules named like primitives are needed#147373
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 9, 2025
Merged
give a better example why std modules named like primitives are needed#147373bors merged 1 commit intorust-lang:masterfrom
std modules named like primitives are needed#147373bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
xizheyin
reviewed
Oct 6, 2025
| //! `char`](primitive::char) that lists all the methods that can be called on | ||
| //! characters (very useful), and there is a [page for the module | ||
| //! `std::char`] that documents iterator and error types created by these methods | ||
| //! (rarely useful). |
Member
There was a problem hiding this comment.
Would it be better to use “rarely used” to make the expression more neutral?
In module char doc, it presents there are some useful items:
This module is the home of the iterator implementations for the iterators implemented on char, as well as some useful constants and conversion functions that convert various types to char.
And would this be a better way to express it?
//! `char`](primitive::char) that lists all the methods that can be called on
//! characters (very useful), and there is a [page for the module
//! `std::char`] that documents utility types, constants, and conversion functions
//! (rarely used).
Contributor
Author
There was a problem hiding this comment.
I would prefer not mentioning the constants and conversion functions here, since they all already exist on the primitive type char itself and do not need to be used anymore, just as it is with std::i32::{MIN, MAX};.
Member
|
Thanks. @bors r+ rollup |
Collaborator
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Oct 9, 2025
…mdev 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 rust-lang#146882.
bors
added a commit
that referenced
this pull request
Oct 9, 2025
Rollup of 7 pull requests Successful merges: - #146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - #147373 (give a better example why `std` modules named like primitives are needed) - #147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - #147457 (specialize slice::fill to use memset when possible) - #147468 (Implement fs api set_times and set_times_nofollow) - #147489 (Prefer to use repeat_n over repeat().take()) - #147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Oct 9, 2025
Rollup of 12 pull requests Successful merges: - #146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - #147373 (give a better example why `std` modules named like primitives are needed) - #147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - #147420 (Add diagnostic items for `pub mod consts` of FP types) - #147457 (specialize slice::fill to use memset when possible) - #147467 (Fix double warnings on `#[no_mangle]`) - #147470 (Clarify how to remediate the panic_immediate_abort error) - #147480 (Do not invalidate CFG caches in CtfeLimit.) - #147481 (format: some small cleanup) - #147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - #147489 (Prefer to use repeat_n over repeat().take()) - #147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Oct 10, 2025
…mdev 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 rust-lang#146882.
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Oct 13, 2025
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Oct 14, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang#147373.
jdonszelmann
added a commit
to jdonszelmann/rust
that referenced
this pull request
Oct 14, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang#147373.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Oct 14, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang#147373.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Oct 14, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang#147373.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Oct 15, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang/rust#147373.
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Nov 30, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang#147373.
Kobzol
pushed a commit
to Kobzol/rustc_codegen_gcc
that referenced
this pull request
Dec 21, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang/rust#147373.
Kobzol
pushed a commit
to Kobzol/rustc_codegen_cranelift
that referenced
this pull request
Dec 29, 2025
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
Kobzol
pushed a commit
to Kobzol/rustc_codegen_cranelift
that referenced
this pull request
Dec 29, 2025
fix missing link to `std::char` in `std` docs Missed this in rust-lang/rust#147373.
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
christian-schilling
pushed a commit
to christian-schilling/rustc_codegen_cranelift
that referenced
this pull request
Jan 27, 2026
Rollup of 12 pull requests Successful merges: - rust-lang/rust#146568 (Port the implemention of SIMD intrinsics from Miri to const-eval) - rust-lang/rust#147373 (give a better example why `std` modules named like primitives are needed) - rust-lang/rust#147419 (bootstrap: add `Builder::rustc_cmd` that includes the lib path) - rust-lang/rust#147420 (Add diagnostic items for `pub mod consts` of FP types) - rust-lang/rust#147457 (specialize slice::fill to use memset when possible) - rust-lang/rust#147467 (Fix double warnings on `#[no_mangle]`) - rust-lang/rust#147470 (Clarify how to remediate the panic_immediate_abort error) - rust-lang/rust#147480 (Do not invalidate CFG caches in CtfeLimit.) - rust-lang/rust#147481 (format: some small cleanup) - rust-lang/rust#147488 (refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`) - rust-lang/rust#147489 (Prefer to use repeat_n over repeat().take()) - rust-lang/rust#147506 (compiletest: Isolate public APIs and minimize public surface area) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A small update to the
stdlib.rsintroduction to replace mentions ofstd::i32(never needed) withstd::char(sometimes needed).Related to #146882.