-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
== operator does not support subtyping #27949
Copy link
Copy link
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-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
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-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.
Here's an example showing this behavior:
(https://play.rust-lang.org/?gist=c7b5d06f19fd345eef91)
Errors with:
Using
impl <'a, 'b> std::cmp::PartialEq<Input<'b>> for Input<'a>works, but it is confusing why the below allows lifetime elision while the above doesn't. I would think it would make sense for the rust compiler to merge the minimum of two lifetimes ('aand'b) automatically when using==if PartialEq is only implemented for one shared lifetime.