[generic_assert] "Constify" the Debug
trait by c410-f3r · Pull Request #135712 · rust-lang/rust (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation7 Commits1 Checks12 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
cc #44838
With the merging of #135423, it now appears possible to start "constifying" arbitrary traits. Therefore, I am starting the "constification" of all the traits involved in the execution of the formatting system to unblock generic_assert
.
const _: () = { panic!("{}", "foo"); };
r? @rust-lang/project-const-traits
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
Relevant to the library team, which will review and decide on the PR/issue.
labels
And no, #135423 does not complete the picture unfortunately. We still need to enforce const stability of calls in MIR.
No, I'm so sorry @c410-f3r, I misread this as "constify the Default
trait", not the Debug
trait.
I will reopen this because I was blind and can't read the difference between Default
and Debug
. However, this is still blocked like that other one.
Don't worry! After all, keeping up with the relentless pace of delivering so many important features in short periods of time is no easy task and it takes its toll. BTW, looking forward to see the stabilization of RTN 🎉
Status: Blocked on something else such as an RFC or other implementation work.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
just wondering how this is useful... all you can do in a const fmt fn is return without printing anything, and I don't think the Formatter
writing methods will become const any time soon (#44838 (comment))
Labels
Status: Blocked on something else such as an RFC or other implementation work.
Relevant to the compiler team, which will review and decide on the PR/issue.
Relevant to the library team, which will review and decide on the PR/issue.