David Tolnay
c008375268
FIx typo in ui test
2024-12-21 10:20:21 -08:00
David Tolnay
07e7d990fa
Add "in this derive macro expansion" to missing Display errors
2024-12-07 08:58:16 -08:00
David Tolnay
714229d821
Work around deprecation warning on generated impl for deprecated type
2024-12-07 08:58:16 -08:00
David Tolnay
42b1460612
Standardize on 'Error, Debug' derive order
2024-12-07 08:48:24 -08:00
David Tolnay
ad2f20b9f7
Use ui test syntax that does not interfere with rustfmt
2024-11-10 23:51:28 -08:00
David Tolnay
1d040f358a
Use Var wrapper only for Pointer formatting
2024-11-10 13:11:21 -08:00
David Tolnay
6a6132d79b
Extend no-display ui test to cover another fmt trait
2024-11-10 13:08:53 -08:00
David Tolnay
2e43d26838
Release 1.0.69
...
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEERijF2Cz/ZdaBZKeK+boUO5X/bYIFAmcwUXUACgkQ+boUO5X/
bYLChBAAiO3silasUL5uxnLNwC3r9IaprdnBHRr69V/7UFGcAWQEN/JMxl+klN4p
/4J8cIJmOFvdR7slB7tEtgkb3P4H4UlO9QGmKcHc86W6TXDztthC2b4eaXKEEPRN
lYxs92iaHBuDSZR7DQ8NjhnPwLFlhoePFGrThNscy7e7e2Qtf2RP4pEeOQwTKIM5
KlBlgpFK+81hP7SruhZHiYMBkA4vbQvwqoRTw+Xszi+olDdnqEntM+ySgfbpbl1H
Gdp7C3+FhTRMSJLofNvEzBTWYv4coOZoDhkEJgXLdRhVomkFIHHMFYiaG6ldXp7n
95hd8KXOfGF41oLmfuPkWDdXgZYlawale4a+g4W9P4Aa8ecW6fW15EvrrZEPtyt7
fVApcMWWn8s174u4inaE2v5FY2gs2lOlxPCVvRUPB16R1T8XJhSHi4VWgKKSo/Jo
gDDLvP+pSRHrC9qIlnkP0XuSK5GjVdymGalUlyUe9JAXmxP90m9jUBYH15WTrTjn
qf0g4KYh6YgOYnUKU3qbYdkNlipjR5I/ISknBgDXcNipGdG1UdBRkGTbA2IquewV
XD/SGhQ8az35pY4SYQRf3yS33DbNNCcBovBQe3u+phHhinGzils6A8ehK5NduxzL
jyRJlq9mvE7+gkTzozKUkJFLLiT7RP9DtQy+yOlos9sHvJQTsI8=
=OL7Q
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEERijF2Cz/ZdaBZKeK+boUO5X/bYIFAmcwUicACgkQ+boUO5X/
bYLv1A//bx+ux6KQd6+f8pAesRkXppDTtvSm0TNuMigFFBfXPE/JWlB995eOm1Wy
LlECgl8hOEf4NF4eiqdgNiqa1n6sY8neqiMDjW4rwl4kaX8dDkBWVEX4Lym8Q3Xt
9OcdiNQOdlVoimeFkizfjDEpYywaeleSNurQ1Id2P/VgWrhnaIRUymYzni+fS98H
HCaAmlf+dfvyyiVNlikJAg/DrMCXKyiX4jVu8KZ6PHJvvfrbS/VXqrh9+tah1vxg
u1DxChokNIllt0Fm+3laFYg/5WwSJuHdn1mJDkh1kWxmdryKIb4Y+dAx6Xp/6BKb
YefRZGUlChrQzbhxTQ6F6GXZqMeV0JJKknYPQ7+Cm1kQDtYS7tCueiUWT/82ZFnD
ETGKIFJuFxnV0YcX0cNCRGo/ZJW5rmnhIFMwYbIma4q9j7zg+Fwn9XHeXbdyX6lC
99uB833bRah8VTL1n/kviLD12eYm7JbahFGluVlLEjFnDjI1oiCY4wNOEJ2let83
CO4FGrA+JGa0DTp9e4zZjnG1ObxtgTVn2p5J6qwzsiczx2Bcw3GEEan254gMiDTo
60w2+ZYYqZe8HWBBINTtUqDPHHfc1ZBIWQk8me7rJuMuH2fT8ihpoordc7YSa269
taBtVxbQYRT3dIwf4LE7VOng+/IN6f7V6Y6aQZldR3t8cyugHYk=
=6xu0
-----END PGP SIGNATURE-----
Merge 1.x (1.0.69) into 2.x (master)
2024-11-09 22:26:47 -08:00
David Tolnay
591a44d9a3
Fix fallback fmt expression parser hang
2024-11-09 22:21:24 -08:00
David Tolnay
5b36e375c2
Add ui test of invalid expression syntax in display attribute
2024-11-09 22:16:01 -08:00
David Tolnay
ba9af4522e
Implement #[error(fmt = ...)]
2024-11-05 17:22:27 -05:00
David Tolnay
6cac4c078e
Set span of generated From impls
2024-11-05 00:20:02 -05:00
David Tolnay
7ca67b01f3
Let rustc generate diagnostic for colliding From impls
2024-11-05 00:19:43 -05:00
David Tolnay
b49f647299
Try joining a span for #[source] and #[from]
2024-11-05 00:14:46 -05:00
David Tolnay
8b663dc3ea
Add ui test of colliding From impls
2024-11-04 23:47:27 -05:00
David Tolnay
6a0eb08569
Recognize infinite recursion caused by {self}
2024-11-04 22:28:23 -05:00
David Tolnay
d3b926132b
Disable numbered access to positional args on tuples
2024-11-04 20:00:31 -05:00
David Tolnay
1142834139
Add ui test of raw identifier in format string
2024-11-04 15:22:04 -05:00
David Tolnay
4d397bc186
Add test of underscore variable in format string
2024-11-04 15:15:44 -05:00
David Tolnay
5d3edf9d7e
Improve error on malformed format attribute
2024-10-31 14:25:18 -07:00
Robert Jördens
7b6e35b992
use core::fmt instead of std::fmt
2024-05-17 15:34:04 +02:00
David Tolnay
0717de3f50
Update ui test suite to nightly-2024-02-08
2024-02-07 21:13:02 -08:00
David Tolnay
c7c75470ec
Update ui test suite to nightly-2024-01-31
2024-01-30 22:18:29 -08:00
David Tolnay
b94add8c9b
Add ui test where fallback impl conflicts with handwritten Display
2023-12-15 14:18:41 -08:00
David Tolnay
1754825c24
Work around trivial bounds being unstable
2023-12-15 14:13:00 -08:00
David Tolnay
1567f40ec3
Try to remove "doesn't implement Debug" in fallback expansion
2023-12-15 14:12:59 -08:00
David Tolnay
d7e3bdd980
Fix redundant "Error doesn't implement Display" in fallback
2023-12-15 14:12:30 -08:00
David Tolnay
7e5ff62806
Emit an Error impl even in the presence of bad attributes
2023-12-15 14:12:13 -08:00
David Tolnay
b010e52359
Add test looking for invalid input to still generate an impl
2023-12-15 12:13:36 -08:00
David Tolnay
abb651db3e
Regenerate missing-display.stderr using modern trybuild
2023-12-15 10:47:33 -08:00
David Tolnay
88edb2b0df
Update to nightly-2023-01-14
2023-12-15 10:47:33 -08:00
David Tolnay
cf0c5a85c3
Update to nightly-2022-12-12
2023-12-15 10:47:33 -08:00
David Tolnay
e7ab6fbd4c
Update to nightly-2022-08-24
2023-12-15 10:47:33 -08:00
David Tolnay
2fe64972de
Update to nightly-2021-08-18
2023-12-15 10:47:33 -08:00
David Tolnay
34e4333af7
Update to nightly-2020-07-29
2023-12-15 10:47:33 -08:00
David Tolnay
65f7773cca
Update to nightly-2020-04-20
2023-12-15 10:47:33 -08:00
David Tolnay
4fe306f5c3
Restore UI test involving missing Display impl
...
This test existed prior to 04b91d7646
.
Since 791a98eb93
, we can rely on rust-src being installed.
2023-12-15 10:47:29 -08:00
David Tolnay
ebebf77fe0
Format ui tests with rustfmt
...
`rustfmt tests/ui/*.rs`
2023-10-19 11:05:01 -07:00
Maarten de Vries
a49f7c603d
Change span of as_dyn_error()
to point compile error at attribute.
2023-10-19 17:09:30 +02:00
David Tolnay
bd640d10e6
Remove unsafe code from AsDisplay
2023-09-02 12:52:34 -07:00
Michal Nazarewicz
97eeb45b8b
Replace DisplayAsDisplay and PathAsDisplay with AsDisplay trait
...
Rather than having separate traits implementing as_display method,
replace DisplayAsDisplay and PathAsDisplay traits with a AsDisplay
trait. The difference between those two traits is in the result
returned by the as_display method. With AsDisplay trait this is
captured by an associated type.
The main motivation for the change is making it simpler to support
no_std builds in the future. Previously, PathAsDisplay would have to
be handled specially in such builds on the side of macro expansion.
Now, thiserror-impl doesn’t need to be aware of any complications
around AsDisplay since they are all contained in thiserror crate.
2023-09-01 04:59:43 +02:00
David Tolnay
5cc5855cd0
Revert "Ui tests with compile_error resolved at call site"
...
This reverts commit b534dafe3b
.
2023-06-07 20:50:23 -07:00
David Tolnay
b534dafe3b
Ui tests with compile_error resolved at call site
2023-06-07 19:59:12 -07:00
David Tolnay
db78fa2cd8
Update ui test suite to nightly-2022-12-15
2022-12-14 18:29:48 -08:00
David Tolnay
29ee95ef47
Ui test changes for trybuild 1.0.66
2022-10-04 22:28:04 -07:00
David Tolnay
c79b023ce1
Update ui test suite to nightly-2022-09-25
2022-09-24 19:49:27 -07:00
David Tolnay
21198c9c0a
Move multiple-provide test into test_backtrace
...
Currently fails with:
error[E0034]: multiple applicable items in scope
--> tests/test_backtrace.rs:165:13
|
165 | x: std::io::Error,
| ^ multiple `provide` found
|
= note: candidate #1 is defined in an impl of the trait `Provider` for the type `E`
= note: candidate #2 is defined in an impl of the trait `std::error::Error` for the type `std::io::Error`
help: disambiguate the associated function for candidate #1
|
165 | Provider::provide(&x, Error): std::io::Error,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
|
165 | std::error::Error::provide(&x, Error): std::io::Error,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-13 11:31:51 -07:00
David Tolnay
9e9afbff24
Add temporary ui test of 'multiple applicable items' error
2022-09-05 18:32:49 -07:00
David Tolnay
034c6ecf10
Update ui test suite to nightly-2022-08-24
2022-08-24 02:15:12 -07:00
David Tolnay
1442e27eaf
Remove stabilized feature(backtrace) from ui test
2022-08-10 21:18:11 -07:00