mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
48 lines
894 B
Rust
48 lines
894 B
Rust
#![warn(clippy::serde_api_misuse)]
|
|
#![allow(dead_code)]
|
|
|
|
extern crate serde;
|
|
|
|
struct A;
|
|
|
|
impl<'de> serde::de::Visitor<'de> for A {
|
|
type Value = ();
|
|
|
|
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,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
|
|
fn visit_string<E>(self, _v: String) -> Result<Self::Value, E>
|
|
where
|
|
E: serde::de::Error,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
}
|
|
|
|
struct B;
|
|
|
|
impl<'de> serde::de::Visitor<'de> for B {
|
|
type Value = ();
|
|
|
|
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,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
}
|
|
|
|
fn main() {}
|