-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple trait bounds on generics and where clause #2
Labels
C-bug
Category: related to a bug.
help wanted
Call for participation: Help is requested to fix this issue
Comments
This is a bug, but maybe a limitation of declarative macros, and I'm not sure if it can be fully fixed. |
This was referenced Nov 29, 2019
?
trait bounds on generics and where clause
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,
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: related to a bug.
help wanted
Call for participation: Help is requested to fix this issue
Workaround: #2 (comment)
Currently, the following code does not be supported:
generics:
?
trait bounds: done in Support ?Sized bounds in generic parameters #9where clause:
?
trait bounds: done in Support ?Sized bounds in where clauses #22reference: https://doc.rust-lang.org/reference/trait-bounds.html#trait-and-lifetime-bounds
The text was updated successfully, but these errors were encountered: