forked from serde-rs/serde
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from serde-rs/master
Fork Sync: Update from parent repository
- Loading branch information
Showing
31 changed files
with
654 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test_suite/tests/ui/default-attribute/incorrect_type_enum_adjacently_tagged.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//! Ensures that error message points to the path in attribute | ||
use serde_derive::Deserialize; | ||
|
||
#[derive(Deserialize)] | ||
#[serde(tag = "tag", content = "content")] | ||
enum Enum { | ||
// Newtype variants does not use the provided path, so it is forbidden here | ||
// Newtype(#[serde(default = "main")] u8), | ||
Tuple( | ||
u8, | ||
#[serde(default = "main")] i8, | ||
), | ||
Struct { | ||
#[serde(default = "main")] | ||
f1: u8, | ||
f2: u8, | ||
#[serde(default = "main")] | ||
f3: i8, | ||
}, | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.