Commit graph

772 commits

Author SHA1 Message Date
David Tolnay
490c962d68
Avoid enum variants through Self
To support compilers older than rustc 1.37.
2019-10-09 10:27:39 -07:00
David Tolnay
6dc9c6e308
Make a workspace root 2019-10-09 10:24:50 -07:00
David Tolnay
f7e48a99b3
Use fmt shorthand in tests 2019-10-09 10:23:33 -07:00
David Tolnay
95cd9864d6
Accept shorthand for the format string 2019-10-09 10:23:20 -07:00
David Tolnay
69df19571a
Implement Display for enums 2019-10-09 09:03:51 -07:00
David Tolnay
4778dc126c
Add basic Display test 2019-10-09 08:57:46 -07:00
David Tolnay
63ba03bacb
Implement Display for structs 2019-10-09 08:45:29 -07:00
David Tolnay
8e866cde57
Error implementation for enums 2019-10-09 08:12:22 -07:00
David Tolnay
761ff1c708
Support any source() that derefs to std::error::Error 2019-10-09 07:33:17 -07:00
David Tolnay
bb13f4b07a
Improve error position when cause is wrong type 2019-10-09 07:30:46 -07:00
David Tolnay
cc4af147f3
Add test with error source 2019-10-09 07:28:24 -07:00
David Tolnay
3e7ddeb72d
Easier display impl in tests 2019-10-09 07:27:11 -07:00
David Tolnay
fe4de24dcc
Add some tests of struct errors 2019-10-09 07:27:10 -07:00
David Tolnay
5038953fd1
Unify braced struct and tuple struct field iteration 2019-10-09 07:27:10 -07:00
David Tolnay
c86452cc68
Add backtrace() method for structs 2019-10-09 07:27:10 -07:00
David Tolnay
4cdeec15e5
Locate field that has the #[source] attribute 2019-10-09 07:27:10 -07:00
David Tolnay
f1dcfe0f0a
Add source() method for structs 2019-10-09 06:57:35 -07:00
David Tolnay
1f02d8d9fd
Implement derive for unit struct errors 2019-10-09 06:46:21 -07:00
David Tolnay
c30d847847
Begin derive macro implementation 2019-10-08 23:29:12 -07:00
David Tolnay
1987e628fa
Add thiserror-impl crate to be the proc macro 2019-10-08 23:22:44 -07:00
David Tolnay
b67ea2e157
Dual mit OR apache license 2019-10-08 23:19:49 -07:00
David Tolnay
1a2172b543
Initial commit 2019-10-08 23:18:38 -07:00