Skip to content

Correct description of panic.rs#157254

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
felix91gr:patch-1
Jun 3, 2026
Merged

Correct description of panic.rs#157254
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
felix91gr:patch-1

Conversation

@felix91gr
Copy link
Copy Markdown
Contributor

I was perusing the module documentation and stumbled upon the existing description, which confused me for a minute.

Summary:

The foremost description of this module was:

Panic support in the standard library.

This commit changes that to:

Panic support in core.

The foremost description of this module was:
> Panic support in the standard library.
This commit changes that to:
> Panic support in core.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 1, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 1, 2026

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 7 candidates
  • Random selection from Mark-Simulacrum, jhpratt

@jhpratt
Copy link
Copy Markdown
Member

jhpratt commented Jun 2, 2026

Can you elaborate about what in particular you found confusing about the current description?

@felix91gr
Copy link
Copy Markdown
Contributor Author

Can you elaborate about what in particular you found confusing about the current description?

Of course :)

I was examining the panic module in core and I was greeted by this description:

A screenshot of the landing page at the `core::panic` docs. It shows, from top to bottom: (1) the browser's address bar at https://doc.rust-lang.org/core/panic/, (2) the name of the module (core), (3) the description and MSRV: 'Module panic; Since 1.41.0', and finally the description: 'Panic support in the standard library.'

I'm doing research and writing for safety critical rust. Since the distinction between std and core is extremely important in safety critical (like for e.g. https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/How.20can.20I.20screw.20up.20my.20panic.20handler.3F/with/599176809), having the description of the module state "you are currently looking at std" when that's not true... made me wonder if I got lost and landed on a broken doc.

Dunno, the contradiction was a bit unsettling in that moment. I'm not the most seasoned rust dev by a long shot, so when the docs say something that contradicts my understanding of the language, I tend to assume I must be mistaken. This is not the case here, right? This should say "core" instead of "the standard library", right? I'm not 100% sure even right now.

@jhpratt
Copy link
Copy Markdown
Member

jhpratt commented Jun 3, 2026

Generally speaking, "standard library" refers to core, alloc, and std collectively, occasionally being extended to include proc_macro and test. So the documentation as-is is correct. With that said, I don't see any harm in explicitly saying core here.

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 3, 2026

📌 Commit f898e61 has been approved by jhpratt

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 3, 2026
Correct description of panic.rs

I was perusing the module documentation and stumbled upon the existing description, which confused me for a minute.

## Summary:

The foremost description of this module was:
> Panic support in the standard library.

This commit changes that to:
> Panic support in core.
rust-bors Bot pushed a commit that referenced this pull request Jun 3, 2026
Rollup of 12 pull requests

Successful merges:

 - #157085 (powerpc: warn against incorrect values for ABI-relevant target features)
 - #157170 (Use `impl` restrictions in `std`, `core`)
 - #157217 ([tiny] remove unecessary `.into()` calls)
 - #157262 (rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item)
 - #157379 (Some more simple per-owner resolver changes)
 - #157381 (librustdoc: fix CSS border issue to support Firefox high contrast mode)
 - #155512 (interpreter: improve comments and error message in mir_assign_valid_types)
 - #157254 (Correct description of panic.rs)
 - #157290 (interpret: fix mir::UnOp layout computation)
 - #157332 (Rewrite target checking for `#[sanitize]`)
 - #157351 (Avoid leaking the query-job collection warning into the panic query stack)
 - #157389 (Add @clarfonthey to libs review rotation)
@rust-bors rust-bors Bot merged commit ce0ff3c into rust-lang:main Jun 3, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 3, 2026
rust-timer added a commit that referenced this pull request Jun 3, 2026
Rollup merge of #157254 - felix91gr:patch-1, r=jhpratt

Correct description of panic.rs

I was perusing the module documentation and stumbled upon the existing description, which confused me for a minute.

## Summary:

The foremost description of this module was:
> Panic support in the standard library.

This commit changes that to:
> Panic support in core.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants