-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Method selection with by-val self may choose the wrong implementor #15335
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
Comments
This was altered recently as part of #15242 (by accident I presume) |
This is the correct behavior with the system we have today. Object methods such as the second method are considered inherent methods, while methods arising from implementations of a trait such as the first method are considered extension methods. Inherent methods are checked before extension methods and override them. Perhaps we want to change this behavior, but this is, as stated, not a bug. |
Sounds like this is working as intended, surprising! |
We can revisit this if it becomes more of a problem. |
…, r=lnicola feat: skip checking token tree count for include! macro call fix rust-lang#15335 rust-lang#15648
I am under the impression that this test should print
overridden
, notint
.Nominating.
The text was updated successfully, but these errors were encountered: