Commit Graph

12 Commits

Author SHA1 Message Date
bors
828bdc2c26 Auto merge of #112849 - m-ou-se:panic-message-format, r=thomcc
Change default panic handler message format.

This changes the default panic hook's message format from:

```
thread '{thread}' panicked at '{message}', {location}
```

to

```
thread '{thread}' panicked at {location}:
{message}
```

This puts the message on its own line without surrounding quotes, making it easiser to read. For example:

Before:
```
thread 'main' panicked at 'env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`', src/main.rs:4:6
```
After:
```
thread 'main' panicked at src/main.rs:4:6:
env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`
```

---

See this PR by `@nyurik,` which does that for only multi-line messages (specifically because of `assert_eq`): https://github.com/rust-lang/rust/pull/111071

This is the change that does that for *all* panic messages.
2023-08-01 14:15:09 +00:00
yukang
90db98d074 print omitted frames count for short backtrace mode 2023-07-29 20:36:05 +08:00
Mara Bos
0e729404da Change default panic handler message format. 2023-07-29 11:42:50 +02:00
Michael Goulet
846d54f16c Structurally resolve in pattern matching when peeling refs in new solver 2023-07-11 02:40:59 +00:00
Amanieu d'Antras
ef7f0e697b Rework handling of recursive panics 2023-05-27 16:35:16 +02:00
yukang
c3394b3eaa Fix #107910, Shorten backtraces in ICEs 2023-05-17 17:56:26 +08:00
Nicholas Nethercote
f20738dfb9 Improve filtering in default-backtrace-ice.rs.
This test is supposed to ensure that full backtraces are used for ICEs.
But it doesn't actually do that -- the filtering done cannot distinguish
between a full backtrace versus a short backtrace.

So this commit changes the filtering to preserve the existence of
`__rust_{begin,end}_short_backtrace` markers, which only appear in full
backtraces. This change means the test now tests what it is supposed to
test.

Also, the existing filtering included a rule that excluded any line
starting with two spaces. This was too strong because it filtered out
some parts of the error message. (This was not a showstopper). It was
also not strong enough because it didn't work with three digit stack
frame numbers, which just started seeing after upgrading my Ubuntu
distro to 23.04 machine (this *was* a showstopper).

So the commit replaces that rule with two more precise rules, one for
lines with stack frame numbers, and one for "at ..." lines.
2023-05-05 07:18:06 +10:00
Lukas Markeffsky
cd398a6de9 test that we format the panic message only once 2023-04-25 18:11:28 +02:00
Eric Huss
a4e851cf62 Add some reasons why tests are ignored. 2023-04-15 16:11:42 -07:00
Oli Scherer
c3522d0637 Move the resolver into a query 2023-02-20 15:28:59 +00:00
Esteban Küber
a7597a1526 Tweak ICE message
Modify main message to be more conversational and emit one fewer note.
2023-02-07 19:17:24 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00