Open taiki-e opened 4 years ago
This is a bug, but maybe a limitation of declarative macros, and I'm not sure if it can be fully fixed.
? trait bounds are supported on both generics and where clause. (#9, #22)
Workaround: This can be avoided by moving bounds to where clause and splitting it.
pin_project! {
- pub struct Multiple<'a, T: core::fmt::Debug + core::fmt::Display> {
+ pub struct Multiple<'a, T: core::fmt::Debug>
+ where
+ T: core::fmt::Display,
{
field: &'a mut T,
}
}
pin_project! {
pub struct Multiple<'a, T>
where
- T: core::fmt::Debug + core::fmt::Display
+ T: core::fmt::Debug,
+ T: core::fmt::Display,
{
field: &'a mut T,
}
}
Currently, the following code does not be supported:
generics:
?
trait bounds: done in #9where clause:
?
trait bounds: done in #22reference: https://doc.rust-lang.org/reference/trait-bounds.html#trait-and-lifetime-bounds