dtolnay/cargo-expand

Question: Why doesn't `cargo expand` this derive?

AnatolyBuga opened this issue · 2 comments

I might be missing something, but I wanted to see the implementation of this derived trait. But cargo expand gives nothing.

#[derive(utoipa::ToSchema)]
pub enum CompoundingFrequency{
    Continuous
}

Cargo.toml:
utoipa ="3.3.0"

Am I missing something?

Seems to work.

$ cargo expand

#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2018::*;
#[macro_use]
extern crate std;
pub enum CompoundingFrequency {
    Continuous,
}
impl<'__s> utoipa::ToSchema<'__s> for CompoundingFrequency {
    fn schema() -> (&'__s str, utoipa::openapi::RefOr<utoipa::openapi::schema::Schema>) {
        (
            "CompoundingFrequency",
            utoipa::openapi::ObjectBuilder::new()
                .schema_type(utoipa::openapi::SchemaType::String)
                .enum_values::<[&str; 1usize], &str>(Some(["Continuous"]))
                .into(),
        )
    }
}

Many thanks. Interesting, must be some issue locally then. Just for the reference, I am on Windows Stable, rustc 1.69.0 (84c898d65 2023-04-16).

Will close for now.