Commit Graph

14 Commits

Author SHA1 Message Date
lcnr
6cf4cb8484 bless mir-opt tests 2024-10-17 10:22:55 +02:00
Scott McMurray
99cb0c6bc3 Bless *all* the mir-opt tests 2024-08-18 16:07:33 -07:00
Nadrieril
3e030b38ef Return the otherwise_block instead of passing it as argument
This saves a few blocks and matches the common `unpack!` paradigm.
2024-07-09 22:47:35 +02:00
Boxy
f74119a2e4 Bless tests and handle tests/crashes 2024-06-05 22:25:42 +01:00
Oli Scherer
c8dfb59406 bless mir-opt tests 2024-04-08 15:08:06 +00:00
Boxy
8124b26122 update region debug formatting 2024-03-18 16:44:12 +00:00
Nadrieril
c00b38e9fb Don't bother to save a block 2024-02-17 20:21:57 +01:00
Nadrieril
faaf81bbbc Start blocks eagerly 2024-02-12 17:37:05 +01:00
Ben Kimock
4451bf4d67 Use a better set of targets for blessing mir-opt tests 2024-02-06 23:36:05 -05:00
Camille GILLOT
ec28dc7aa7 Use PlaceMention for match scrutinees. 2023-10-24 15:30:17 +00:00
Camille GILLOT
4ff03cd1a4 Allow to run filecheck in mir-opt tests. 2023-10-19 15:51:52 +00:00
Camille GILLOT
02424e4bc5 Normalize alloc-id in tests. 2023-10-16 16:29:35 +00:00
Ralf Jung
5a3410ad1a make ty::Const debug printing less verbose 2023-09-16 16:31:09 +02:00
Nicholas Nethercote
64ea8eb1a9 Disentangle Debug and Display for Ty.
The `Debug` impl for `Ty` just calls the `Display` impl for `Ty`. This
is surprising and annoying. In particular, it means `Debug` doesn't show
as much information as `Debug` for `TyKind` does. And `Debug` is used in
some user-facing error messages, which seems bad.

This commit changes the `Debug` impl for `Ty` to call the `Debug` impl
for `TyKind`. It also does a number of follow-up changes to preserve
existing output, many of which involve inserting
`with_no_trimmed_paths!` calls. It also adds `Display` impls for
`UserType` and `Canonical`.

Some tests have changes to expected output:
- Those that use the `rustc_abi(debug)` attribute.
- Those that use the `EMIT_MIR` annotation.

In each case the output is slightly uglier than before. This isn't
ideal, but it's pretty weird (particularly for the attribute) that the
output is using `Debug` in the first place. They're fairly obscure
attributes (I hadn't heard of them) so I'm not worried by this.

For `async-is-unwindsafe.stderr`, there is one line that now lacks a
full path. This is a consistency improvement, because all the other
mentions of `Context` in this test lack a path.
2023-09-11 12:51:07 +10:00