Skip to content

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Sep 20, 2023

panic_str just directly calls panic_display. The only reason panic_str exists, is for a lint to detect an expansion of panic_2015!(expr) (which expands to panic_str).

It is panic_display that is hooked by const-eval, which is the reason we call it here.

Part of #116005

r? @oli-obk

@m-ou-se m-ou-se added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 20, 2023
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 20, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Sep 21, 2023

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 21, 2023

📌 Commit 667bba4 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 Sep 21, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 21, 2023
…lay, r=oli-obk

Call panic_display directly in const_panic_fmt.

`panic_str` just directly calls `panic_display`. The only reason `panic_str` exists, is for a lint to detect an expansion of `panic_2015!(expr)` (which expands to `panic_str`).

It is `panic_display` that is hooked by const-eval, which is the reason we call it here.

Part of rust-lang#116005

r? `@oli-obk`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2023
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#104385 (Raise minimum supported Apple OS versions)
 - rust-lang#115936 (Prevent promotion of const fn calls in inline consts)
 - rust-lang#115972 (rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const)
 - rust-lang#116007 (Call panic_display directly in const_panic_fmt.)
 - rust-lang#116019 (Delete obsolete `--disable-per-crate-search` rustdoc flag)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2023
…llaumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#115257 (Improve invalid UTF-8 lint by finding the expression initializer)
 - rust-lang#115936 (Prevent promotion of const fn calls in inline consts)
 - rust-lang#115972 (rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const)
 - rust-lang#116007 (Call panic_display directly in const_panic_fmt.)
 - rust-lang#116019 (Delete obsolete `--disable-per-crate-search` rustdoc flag)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0d2c603 into rust-lang:master Sep 21, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 21, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2023
Rollup merge of rust-lang#116007 - m-ou-se:const-panic-fmt-panic-display, r=oli-obk

Call panic_display directly in const_panic_fmt.

`panic_str` just directly calls `panic_display`. The only reason `panic_str` exists, is for a lint to detect an expansion of `panic_2015!(expr)` (which expands to `panic_str`).

It is `panic_display` that is hooked by const-eval, which is the reason we call it here.

Part of rust-lang#116005

r? ``@oli-obk``
@m-ou-se m-ou-se deleted the const-panic-fmt-panic-display branch June 17, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-eval Area: Constant evaluation, covers all const contexts (static, const fn, ...) C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

5 participants