-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
taiki-e
added
C-bug
Category: related to a bug.
C-enhancement
Category: A new feature or an improvement for an existing one
labels
Oct 22, 2019
This is a bug, but maybe a limitation of declarative macros, and I'm not sure if it can be fully fixed. |
taiki-e
added
the
help wanted
Call for participation: Help is requested to fix this issue
label
Oct 22, 2019
This was referenced Nov 29, 2019
bors bot
added a commit
that referenced
this issue
Jan 20, 2020
9: Support ?Sized bounds in generic parameters r=taiki-e a=taiki-e part of #2 Co-authored-by: Taiki Endo <[email protected]>
bors bot
added a commit
that referenced
this issue
Jan 20, 2020
9: Support ?Sized bounds in generic parameters r=taiki-e a=taiki-e part of #2 Co-authored-by: Taiki Endo <[email protected]>
bors bot
added a commit
that referenced
this issue
Jun 4, 2020
22: Support ?Sized bounds in where clauses r=taiki-e a=taiki-e a part of #2 Co-authored-by: Taiki Endo <[email protected]>
taiki-e
removed
help wanted
Call for participation: Help is requested to fix this issue
C-enhancement
Category: A new feature or an improvement for an existing one
labels
Jun 4, 2020
taiki-e
changed the title
Cannot support multiple trait bounds and
Cannot support multiple trait bounds on generics and where clause
Jun 4, 2020
?
trait bounds on generics and where clause
taiki-e
added
the
help wanted
Call for participation: Help is requested to fix this issue
label
Nov 13, 2020
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,
}
} |
taiki-e
changed the title
Cannot support multiple trait bounds on generics and where clause
Support multiple trait bounds on generics and where clause
Jul 21, 2021
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
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: