Closed
Description
Originally reported with Cargo this code:
#![warn(rust_2018_compatibility)]
extern crate serde;
#[macro_use]
extern crate serde_derive;
use serde::{Deserialize, Deserializer};
macro_rules! event {
(
pub struct $name:ident() {}
) => {
#[derive(Deserialize)]
pub struct $name {
pub event_type: $crate::EventType,
}
}
}
pub enum EventType {}
event! {
pub struct CustomEvent() {}
}
impl<'de> Deserialize<'de> for EventType {
fn deserialize<D>(_deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
unimplemented!()
}
}
which causes it to fail to be migrated by cargo fix