-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
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
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.