-
-
Notifications
You must be signed in to change notification settings - Fork 15k
where clause not honored in trait impl body #20414
Copy link
Copy link
Closed
Labels
A-type-systemArea: Type systemArea: Type systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Even though I've stipulated in the
whereclause thatNewtype<'a, T>must implementFoofor this impl to apply, I can't callansweron aNewtype<'a, T>within the impl body.Workaround
Per @jroesch below, this can be worked around by using
Foo::answer(&mut newtype)instead ofnewtype.answer().Test case