You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use serde::{Serialize,Deserialize};mod cssparser {#[derive(Default)]pubstructColor;}#[derive(Serialize,Deserialize)]pubstructCSSColor(#[serde(skip)]pub cssparser::Color);fnmain(){}
error[E0277]: the trait bound `Color: Serialize` is not satisfied
--> src/main.rs:9:21
|
9 | pub struct CSSColor(#[serde(skip)] pub cssparser::Color);
| ^ the trait `Serialize` is not implemented for `Color`
|
note: required by `serialize_newtype_struct`
--> /playground/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.131/src/ser/mod.rs:898:5
|
898 | / fn serialize_newtype_struct<T: ?Sized>(
899 | | self,
900 | | name: &'static str,
901 | | value: &T,
902 | | ) -> Result<Self::Ok, Self::Error>
903 | | where
904 | | T: Serialize;
| |_____________________^
error[E0277]: the trait bound `Color: Deserialize<'_>` is not satisfied
--> src/main.rs:9:21
|
9 | pub struct CSSColor(#[serde(skip)] pub cssparser::Color);
| ^ the trait `Deserialize<'_>` is not implemented for `Color`
|
note: required by a bound in `_::_serde::Deserialize::deserialize`
--> /playground/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.131/src/de/mod.rs:539:12
|
539 | D: Deserializer<'de>;
| ^^^^^^^^^^^^^^^^^ required by this bound in `_::_serde::Deserialize::deserialize`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground` due to 2 previous errors
The text was updated successfully, but these errors were encountered:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3a73a0bf1d9ea9ec7051efc415fa909b
error:
The text was updated successfully, but these errors were encountered: