Skip to content

Prefer to suggest stable candidates rather than unstable ones #140795

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

Merged
merged 1 commit into from
May 11, 2025

Conversation

mu001999
Copy link
Contributor

@mu001999 mu001999 commented May 8, 2025

Fixes #140240

The logic is to replace unstable suggestions if we meet a new stable one, and do nothing if any other situation. In old logic, we just use the first candidate we meet as the suggestion for the same items.

E.g., std::range::legacy::Range vs std::ops::Range, legacy in the former is unstable, we prefer to suggest use the latter.

@rustbot
Copy link
Collaborator

rustbot commented May 8, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented May 8, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 8, 2025
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 8, 2025
@mu001999 mu001999 force-pushed the sugg-stable-import-first branch from 76e7050 to 7b0ff5c Compare May 8, 2025 14:32
@mu001999
Copy link
Contributor Author

mu001999 commented May 8, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 8, 2025
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2025
@mu001999 mu001999 force-pushed the sugg-stable-import-first branch from 7b0ff5c to 7c253ac Compare May 9, 2025 14:07
@mu001999
Copy link
Contributor Author

mu001999 commented May 9, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 9, 2025
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 10, 2025

📌 Commit 7c253ac has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#140792 (Use intrinsics for `{f16,f32,f64,f128}::{minimum,maximum}` operations)
 - rust-lang#140795 (Prefer to suggest stable candidates rather than unstable ones)
 - rust-lang#140865 (Make t letter looks like lowercase rather than uppercase)
 - rust-lang#140878 (Two expand-related cleanups)
 - rust-lang#140882 (Split duration_constructors to get non-controversial constructors out)
 - rust-lang#140886 (Update deps of bootstrap for Cygwin)
 - rust-lang#140903 (test intrinsic fallback bodies with Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 15df333 into rust-lang:master May 11, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 11, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2025
Rollup merge of rust-lang#140795 - mu001999-contrib:sugg-stable-import-first, r=petrochenkov

Prefer to suggest stable candidates rather than unstable ones

Fixes rust-lang#140240

The logic is to replace unstable suggestions if we meet a new stable one, and do nothing if any other situation. In old logic, we just use the first candidate we meet as the suggestion for the same items.

E.g., `std::range::legacy::Range` vs `std::ops::Range`, `legacy` in the former is unstable, we prefer to suggest use the latter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustc does not suggest importing the old Range type
4 participants