Skip to content

regression: abs_diff conflict leading to compilation failures #90320

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Mark-Simulacrum opened this issue Oct 26, 2021 · 3 comments · Fixed by #90329
Closed

regression: abs_diff conflict leading to compilation failures #90320

Mark-Simulacrum opened this issue Oct 26, 2021 · 3 comments · Fixed by #90329
Assignees
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Oct 26, 2021

The abs_diff API was added to integer types in #88780, which is leading to compilation failures in:

Since it's just a couple cases I suspect we can just accept this regression, but wanted to surface it to T-libs-api. (Maybe a rename or something is in order).

@Mark-Simulacrum Mark-Simulacrum added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Oct 26, 2021
@Mark-Simulacrum Mark-Simulacrum added this to the 1.57.0 milestone Oct 26, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 26, 2021
@nbdd0121
Copy link
Contributor

Similar things have caused breakage a few times. I'll investigate.

@rustbot claim

@nbdd0121
Copy link
Contributor

Okay, found the issue. The issue is that we try "by_value" before "autoref", and then within each we try "stable" before "unstable", so "unstable by_value" takes priority over "stable autoref". The fix should simply be try all stable candidates first and then try unstable ones. Working on a fix now.

@m-ou-se
Copy link
Member

m-ou-se commented Oct 27, 2021

Discussed in the meeting. This is expected and acceptable. Improvements to name resolution to avoid issues like this in the future would be nice though!

@m-ou-se m-ou-se closed this as completed Oct 27, 2021
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 19, 2021
Try all stable method candidates first before trying unstable ones

Currently we try methods in this order in each step:
* Stable by value
* Unstable by value
* Stable autoref
* Unstable autoref
* ...

This PR changes it to first try pick methods without any unstable candidates, and if none is found, try again to pick unstable ones.

Fix rust-lang#90320
CC rust-lang#88971, hopefully would allow us to rename the "unstable_*" methods for integer impls back.

`@rustbot` label T-compiler T-libs-api
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants