David Tolnay
85b0944eac
Reject transparent attr in field attribute position
2020-04-27 15:48:44 -07:00
David Tolnay
dbdb5a2f2b
Update ui tests to nightly-2020-04-20
...
Relevant rustc bug: https://github.com/rust-lang/rust/issues/71363
2020-04-20 11:37:16 -07:00
David Tolnay
4885372ced
Improve span of missing Display impl error
2020-04-11 10:34:26 -07:00
David Tolnay
b649704973
Check which `Error` the error message refers to
2020-04-11 10:26:37 -07:00
David Tolnay
5075cebf81
Add ui test for Error without Display impl
2020-04-11 10:13:11 -07:00
David Tolnay
40b9073bc4
Add test with deprecated variant
2020-03-29 08:41:55 -07:00
David Tolnay
5ebbfb80e1
Add expr test cases from rustup
2020-03-22 23:04:01 -07:00
David Tolnay
a1ae05c954
Add error message for non-static source
2020-03-20 22:39:18 -07:00
David Tolnay
f80d7de018
Add expression tests from rcc codebase
2020-03-14 21:14:39 -07:00
David Tolnay
20b87994a0
Format with rustfmt 2019-10-07
2020-03-14 21:10:48 -07:00
David Tolnay
a15f36fde6
Update ui tests to nightly-2020-03-01
2020-03-01 11:41:15 -08:00
David Tolnay
5b89426896
Add test with match expr
2020-01-28 11:43:41 -08:00
David Tolnay
ff9524e1fd
Update ui tests to nightly-2020-01-11
2020-01-11 16:33:19 -08:00
David Tolnay
d844466046
Split duplicate-source ui test
2019-12-18 11:00:35 -08:00
David Tolnay
7f943c1fcd
Split source-not-error ui test for structs and enums
...
This eliminates potential flakiness if parallel rustc were to compile
thw two impls in different threads, affecting the order in which the two
errors are emitted.
2019-12-18 10:57:47 -08:00
David Tolnay
20202db299
Remove incorrect detection of simple fmt cases
...
This was intended to detect the simple cases "{var}" and "{var:?}" and emit them
as straightforward Display::fmt and Debug::fmt method calls rather than a write
macro, but this was only to keep the generated code simple and is not important.
It was broken by the changes to how we parse the fmt attr in 1.0.7.
Fixes #53 .
2019-12-03 19:33:17 -08:00
David Tolnay
05f0a0fb77
Add trybuild tests for transparent feature
2019-11-30 23:39:30 -08:00
David Tolnay
ac61f40e37
Test transparent attribute
2019-11-30 22:00:48 -08:00
David Tolnay
a96068939b
Accommodate trailing comma in shorthand expansion
2019-11-30 18:36:22 -08:00
David Tolnay
26fe392262
Only apply int shorthand for tuple fields that exist
2019-11-30 18:32:43 -08:00
David Tolnay
c05e9ed4ec
Support mixing shorthand and non-shorthand format args
2019-11-30 17:45:44 -08:00
David Tolnay
03e522411e
Break up test_display into individual test cases
2019-11-30 17:35:24 -08:00
David Tolnay
7f8b5784cb
Support referring to statics and consts from shorthand
2019-11-30 16:30:04 -08:00
David Tolnay
634bec57c4
Add test of escaped braces in format string
2019-11-30 16:24:43 -08:00
David Tolnay
3348428b60
Assert that boxed source can be downcast
2019-11-18 23:20:53 -08:00
Ben Boeckel
4303f71cce
aserror: support Send + !Sync errors too
2019-11-18 22:14:23 -05:00
David Tolnay
4bd5753b94
Add ui test of missing Display impl
2019-11-09 18:38:02 -08:00
David Tolnay
f1eb7a8fcb
Add test for displaying paths
2019-11-09 18:24:49 -08:00
David Tolnay
f90fe75315
Test #[from]
2019-10-12 17:55:29 -07:00
David Tolnay
2305f75976
Validate #[from] attribute
2019-10-12 17:55:29 -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
30b1561f65
Add test for optional source
2019-10-12 16:07:23 -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
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
5ea03dd7da
Support Display impl for void enums
2019-10-12 13:53:39 -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
41068e5435
Variants inherit fmt attr from the enum
2019-10-12 13:30:32 -07:00
David Tolnay
d42a95076c
Detect duplicate source attributes
2019-10-12 13:03:43 -07:00
David Tolnay
39d2ae53ba
Set up some trybuild tests
2019-10-11 11:47:57 -07:00
David Tolnay
c6000945c7
Collapse some needlessly verbose code in test
2019-10-11 11:04:07 -07:00
David Tolnay
7fa5b8114d
Accept `.var` shorthand inside of parens
2019-10-11 10:46:20 -07:00
David Tolnay
8b31ec6fd0
Format with rustfmt 2019-09-08
2019-10-11 10:46:20 -07:00
David Tolnay
18f327f834
Add test of an interpolated expression
2019-10-09 10:42:49 -07:00
David Tolnay
f7e48a99b3
Use fmt shorthand in tests
2019-10-09 10:23:33 -07:00
David Tolnay
69df19571a
Implement Display for enums
2019-10-09 09:03:51 -07:00