David Tolnay
|
03e77b3d2b
|
Treat the #[from] field implicitly as source
|
2019-10-12 17:55:29 -07:00 |
David Tolnay
|
2305f75976
|
Validate #[from] attribute
|
2019-10-12 17:55:29 -07:00 |
David Tolnay
|
8cbc50e05a
|
Parse #[from] attribute
|
2019-10-12 17:30:09 -07:00 |
David Tolnay
|
0c5e34fb12
|
Rename attr validation methods
|
2019-10-12 17:27:40 -07:00 |
David Tolnay
|
f16952290d
|
Simplify storage of source and backtrace attrs
|
2019-10-12 16:28:24 -07:00 |
David Tolnay
|
cb73bf9ccc
|
Merge pull request #29 from dtolnay/opt
Support Option<Source> and Option<Backtrace>
|
2019-10-12 16:28:04 -07:00 |
David Tolnay
|
b4996def92
|
Make test_option appear as ignored or passing
|
2019-10-12 16:18:43 -07:00 |
David Tolnay
|
d9ed0fba49
|
Add test for optional backtrace
|
2019-10-12 16:14:07 -07:00 |
David Tolnay
|
fac0a7aa0d
|
Support Option<Backtrace>
|
2019-10-12 16:07:23 -07:00 |
David Tolnay
|
30b1561f65
|
Add test for optional source
|
2019-10-12 16:07:23 -07:00 |
David Tolnay
|
f18a2a605d
|
Support Option<$source>
|
2019-10-12 16:07:23 -07:00 |
David Tolnay
|
c2865642b0
|
Merge pull request #28 from dtolnay/backtrace
Prefer the source's backtrace if it has one
|
2019-10-12 15:37:26 -07:00 |
David Tolnay
|
2c9bcc5347
|
Elevate precedence of explicitly marked backtrace
|
2019-10-12 15:24:15 -07:00 |
David Tolnay
|
678cd7ac7b
|
Make the trivial as_dyn_error impls inlinable
|
2019-10-12 15:22:50 -07:00 |
David Tolnay
|
18f2337ffc
|
Prefer the source's backtrace if it has one
|
2019-10-12 15:11:48 -07:00 |
David Tolnay
|
72cf49ccd4
|
#[backtrace] attribute for explicitly selecting the backtrace field
|
2019-10-12 15:02:11 -07:00 |
David Tolnay
|
de6719e923
|
Improve span for the enum case
|
2019-10-12 15:01:57 -07:00 |
David Tolnay
|
098dcf26c3
|
Improve span when source is not an Error
|
2019-10-12 14:56:08 -07:00 |
David Tolnay
|
5c0cea6e16
|
Add compilefail test for source that is not an Error
|
2019-10-12 14:45:20 -07:00 |
David Tolnay
|
97576776e7
|
Merge pull request #27 from dtolnay/source
Assume #[source] attribute for fields named `source`
|
2019-10-12 14:28:51 -07:00 |
David Tolnay
|
6b35d7f73c
|
Assume #[source] attribute for fields named `source`
|
2019-10-12 14:20:33 -07:00 |
David Tolnay
|
99f035e1b8
|
Avoid dead code warning on void enum in test
|
2019-10-12 14:10:41 -07:00 |
David Tolnay
|
a34af0d6a6
|
Merge pull request #26 from dtolnay/void
Support Display impl for void enums
|
2019-10-12 14:06:56 -07:00 |
David Tolnay
|
5ea03dd7da
|
Support Display impl for void enums
|
2019-10-12 13:53:39 -07:00 |
David Tolnay
|
acaa504718
|
Merge pull request #25 from dtolnay/valid
Reject attributes in unrecognized places
|
2019-10-12 13:53:27 -07:00 |
David Tolnay
|
aa123cfe0c
|
Reject display attribute on a field
|
2019-10-12 13:45:26 -07:00 |
David Tolnay
|
10d1f640da
|
Reject source attribute not on a field
|
2019-10-12 13:42:11 -07:00 |
David Tolnay
|
7c9dcaebbc
|
Merge pull request #24 from dtolnay/inherit
Variants inherit fmt attr from the enum
|
2019-10-12 13:42:04 -07:00 |
David Tolnay
|
41068e5435
|
Variants inherit fmt attr from the enum
|
2019-10-12 13:30:32 -07:00 |
David Tolnay
|
f7b08d401c
|
Merge pull request #23 from dtolnay/dup
Detect duplicate source attributes
|
2019-10-12 13:13:06 -07:00 |
David Tolnay
|
d42a95076c
|
Detect duplicate source attributes
|
2019-10-12 13:03:43 -07:00 |
David Tolnay
|
ae085b0863
|
Merge pull request #22 from dtolnay/prop
Move more tree analysis logic out of expand.rs
|
2019-10-12 12:37:05 -07:00 |
David Tolnay
|
68c18d6ecf
|
Move more tree analysis logic to prop.rs
|
2019-10-12 12:26:50 -07:00 |
David Tolnay
|
3b279475b2
|
Merge pull request #21 from dtolnay/valid
Perform all validation up front
|
2019-10-12 11:50:40 -07:00 |
David Tolnay
|
1764ddeae4
|
Perform all validation up front
|
2019-10-12 11:41:36 -07:00 |
David Tolnay
|
90020d4804
|
Merge pull request #20 from dtolnay/ast
Introduce data structures to make validations easier
|
2019-10-12 11:29:47 -07:00 |
David Tolnay
|
e3f152983c
|
Record original syntax tree references for error reporting
|
2019-10-12 11:17:30 -07:00 |
David Tolnay
|
69052f88d8
|
Switch expansion to use new ast
|
2019-10-12 11:17:30 -07:00 |
David Tolnay
|
60987ffa76
|
Introduce syntax tree that makes validations easier
|
2019-10-12 11:16:54 -07:00 |
David Tolnay
|
0f4f7673dc
|
Merge pull request #19 from dtolnay/ast
Uniformly parse all attributes in all positions
|
2019-10-12 11:16:44 -07:00 |
David Tolnay
|
5b0d29a6e5
|
Restore support for rustc <1.36
|
2019-10-12 11:08:32 -07:00 |
David Tolnay
|
b78fe1891b
|
Detect duplicate attributes on the same syntax tree node
|
2019-10-12 09:49:36 -07:00 |
David Tolnay
|
3d43d39ed1
|
Uniformly parse all attributes in all positions
|
2019-10-12 09:44:26 -07:00 |
David Tolnay
|
31ecbd2410
|
Merge pull request #17 from dtolnay/trybuild
Set up some trybuild tests
|
2019-10-11 12:06:38 -07:00 |
David Tolnay
|
39d2ae53ba
|
Set up some trybuild tests
|
2019-10-11 11:47:57 -07:00 |
David Tolnay
|
ab48dd19d3
|
Resolve iter_skip_next lint
|
2019-10-11 11:12:28 -07:00 |
David Tolnay
|
5994705b38
|
Generate more concise code for pass-through format
Fixes #13.
|
2019-10-11 11:05:09 -07:00 |
David Tolnay
|
a6b1d28e40
|
Keep track of whether fmt string uses shorthand
|
2019-10-11 11:05:09 -07:00 |
David Tolnay
|
c6000945c7
|
Collapse some needlessly verbose code in test
|
2019-10-11 11:04:07 -07:00 |
David Tolnay
|
02f56e0c49
|
Merge pull request #16 from dtolnay/nested
Accept `.var` shorthand inside of parens
|
2019-10-11 11:03:29 -07:00 |