From 6381d0c5b753ac19f61dd06a38696d4462612d9a Mon Sep 17 00:00:00 2001 From: d4h0 <183805+d4h0@users.noreply.github.com> Date: Sun, 16 Aug 2020 16:42:52 +0400 Subject: [PATCH] Add warning to RawValue docs regarding untagged enums --- src/raw.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/raw.rs b/src/raw.rs index c373b4ded..8c1eb584c 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -23,6 +23,8 @@ use serde::ser::{Serialize, SerializeStruct, Serializer}; /// `RawValue` is only available if serde\_json is built with the `"raw_value"` /// feature. /// +/// For [technical reasons](https://github.com/serde-rs/json/issues/497), `RawValue` can't be used with untagged enums at the moment. Trying to deserialize to an untagged enum with `RawValue`, therefore, always fails with an error. +/// /// ```toml /// [dependencies] /// serde_json = { version = "1.0", features = ["raw_value"] }