mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 10:17:58 +00:00
Update error span for attribute / data kind mismatches
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default)] can only be used on structs with named fields
|
||||
--> tests/ui/default-attribute/enum.rs:5:1
|
||||
--> tests/ui/default-attribute/enum.rs:4:9
|
||||
|
|
||||
5 | enum E {
|
||||
| ^^^^
|
||||
4 | #[serde(default)]
|
||||
| ^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default = "...")] can only be used on structs with named fields
|
||||
--> tests/ui/default-attribute/enum_path.rs:5:1
|
||||
--> tests/ui/default-attribute/enum_path.rs:4:9
|
||||
|
|
||||
5 | enum E {
|
||||
| ^^^^
|
||||
4 | #[serde(default = "default_e")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: #[serde(default = "...")] can only be used on structs with named fields
|
||||
--> tests/ui/default-attribute/nameless_struct_fields_path.rs:5:9
|
||||
--> tests/ui/default-attribute/nameless_struct_fields_path.rs:4:9
|
||||
|
|
||||
5 | struct T(u8, u8);
|
||||
| ^^^^^^^^
|
||||
4 | #[serde(default = "default_t")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Reference in New Issue
Block a user