Commit Graph

77 Commits

Author SHA1 Message Date
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
David Tolnay 8b31ec6fd0
Format with rustfmt 2019-09-08 2019-10-11 10:46:20 -07:00
David Tolnay 7fa5b8114d
Accept `.var` shorthand inside of parens 2019-10-11 10:46:20 -07:00
David Tolnay e50cf82f33
Extract the fmt args parser to a function 2019-10-11 10:46:20 -07:00
David Tolnay 87c80e72c8
Release 1.0.1 2019-10-09 13:05:34 -07:00
David Tolnay 13e8352b67
Call out that we do not appear in public API 2019-10-09 13:04:28 -07:00
David Tolnay 86f6b3bc4a
Release 1.0.0 2019-10-09 11:05:13 -07:00
David Tolnay 7d26b19d07
Fill in crates.io metadata 2019-10-09 11:05:12 -07:00
David Tolnay bba1013d3f
Fix up doc tests to pass tests 2019-10-09 11:03:02 -07:00