2016-07-12 17:36:11 +02:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
2017-05-17 14:19:44 +02:00
|
|
|
#![warn(serde_api_misuse)]
|
2016-07-12 17:36:11 +02:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
extern crate serde;
|
|
|
|
|
|
|
|
struct A;
|
|
|
|
|
2017-05-09 15:23:10 +02:00
|
|
|
impl<'de> serde::de::Visitor<'de> for A {
|
2016-07-12 17:36:11 +02:00
|
|
|
type Value = ();
|
2017-01-24 11:31:42 +01:00
|
|
|
|
|
|
|
fn expecting(&self, _: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn visit_str<E>(self, _v: &str) -> Result<Self::Value, E>
|
|
|
|
where E: serde::de::Error,
|
2016-07-12 17:36:11 +02:00
|
|
|
{
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
2017-01-24 11:31:42 +01:00
|
|
|
fn visit_string<E>(self, _v: String) -> Result<Self::Value, E>
|
|
|
|
where E: serde::de::Error,
|
2016-07-12 17:36:11 +02:00
|
|
|
{
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct B;
|
|
|
|
|
2017-05-09 15:23:10 +02:00
|
|
|
impl<'de> serde::de::Visitor<'de> for B {
|
2016-07-12 17:36:11 +02:00
|
|
|
type Value = ();
|
|
|
|
|
2017-01-24 11:31:42 +01:00
|
|
|
fn expecting(&self, _: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn visit_string<E>(self, _v: String) -> Result<Self::Value, E>
|
|
|
|
where E: serde::de::Error,
|
2016-07-12 17:36:11 +02:00
|
|
|
{
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|