Panics when deriving Error for an enum with a type dictionary trait
KSXGitHub opened this issue · 1 comments
KSXGitHub commented
Code
Repo: https://github.com/KSXGitHub/bug-report-derive-more-type-dict
use derive_more::{Display, Error};
pub trait MyTypeDict {
type Foo;
type Bar;
}
#[derive(Debug, Display, Error)]
pub enum MyEnum<TypeDict: MyTypeDict> {
Foo(#[error(source)] TypeDict::Foo),
Bar(#[error(source)] TypeDict::Bar),
}
Error
error: proc-macro derive panicked
--> src/lib.rs:8:26
|
8 | #[derive(Debug, Display, Error)]
| ^^^^^
|
= help: message: expected `,`
tyranron commented
Doesn't reproduce on 1.0.0-beta.3
and master
.