Skip to content

Commit 518e10a

Browse files
committed
Fix Deser for Other Attributes
Deser failed for other attributes because they were missing the `untagged` marker.
1 parent 2464812 commit 518e10a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ pub enum Attribute {
242242
/// 1. A HIR debug printing, like `"#[attr = Optimize(Speed)]"`
243243
/// 2. The attribute as it appears in source form, like
244244
/// `"#[optimize(speed)]"`.
245+
// XXX: This variant must be last in the enum because it is untagged.
246+
#[serde(untagged)]
245247
Other(String),
246248
}
247249

@@ -878,6 +880,8 @@ pub enum Abi {
878880
/// Can be specified as `extern "system"`.
879881
System { unwind: bool },
880882
/// Any other ABI, including unstable ones.
883+
// XXX: This variant must be last in the enum because it is untagged.
884+
#[serde(untagged)]
881885
Other(String),
882886
}
883887

0 commit comments

Comments
 (0)