-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Make fail message more presentable #15239
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is this still something we want to do? I have a small patch that implements something like this and would also fix #11704, but I'm not sure how many people really want another format for panic messages. Changing the format might also break existing tools (for example, there are several run-tests in this repo that expect a panic). |
I'd be all for it, I still find those messages hard to read even after all these years. |
@jooert you should submit it |
The pull request didn't really fix this bug... should I make another bug like this, or is this a wontfix now? |
Oh sorry, that's because I didn't change the original pull request message. Perhaps @alexcrichton can comment on this? |
This is somewhat of a wontfix for now, the discussion of #30402 concluded that we likely don't want to radically change the format for now due to the concurrency/verbosity reasons mentioned. If this becomes extra onerous in the future, however, we can consider reformatting these messages. |
…eykril internal : rewrite DeMorgan assist fixes rust-lang#15239 , rust-lang#15240 . This PR is a rewrite of the DeMorgan assist that essentially rids of all the string manipulation and modifies syntax trees to apply demorgan on a binary expr. The main reason for the rewrite is that I wanted to use `Expr::needs_parens_in` method to see if the expr on which the assist is applied would still need the parens it had once the parent expression's operator had equal precedence with that of the expression. I used `.clone_(subtree|for_update)` left and right and probably more than I should have, so I would also be happy to hear how I could have prevented redundant cloning.
Given this code,
the failure message looks like this
This is problematic as the useful information (the message passed to
fail!
)is buried inside the sentence. It'd be better if the failure message was on its own line, something akin to:This format also allows for space to mention other useful information (e.g. issue #11704).
The text was updated successfully, but these errors were encountered: