-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Description
Given this code,
fn main()
{
fail!("This is why you fail.")
}
the failure message looks like this
task '<main>' failed at 'This is why you fail.', test.rs:3
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:
task '<main>' failed at test.rs:3, saying:
This is why you fail.
This format also allows for space to mention other useful information (e.g. issue #11704).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
jooert commentedon Dec 15, 2015
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).
SiegeLord commentedon Dec 15, 2015
I'd be all for it, I still find those messages hard to read even after all these years.
steveklabnik commentedon Dec 15, 2015
@jooert you should submit it
Auto merge of #30402 - jooert:prettypanic, r=alexcrichton
SiegeLord commentedon Jan 27, 2016
The pull request didn't really fix this bug... should I make another bug like this, or is this a wontfix now?
jooert commentedon Jan 27, 2016
Oh sorry, that's because I didn't change the original pull request message. Perhaps @alexcrichton can comment on this?
alexcrichton commentedon Jan 27, 2016
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.
Auto merge of rust-lang#15410 - alibektas:15240/invalid-demorgan, r=V…
Update manual_is_variant_and documentation to include equality compar…