Filter do_not_recommend impls before handling a single candidate - #162771
Merged
Merged
Conversation
Collaborator
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
estebank
reviewed
Sep 14, 2026
Contributor
There was a problem hiding this comment.
You need to run x.py test tests/ui --bless to update existing .stderr tests.
Looking at the diffs, I am concerned that the other tests' output might be a regression (but it'll be easier to read once you update the PR).
Contributor
|
One last nitpick: could you squash the commits? After that, we can merge. |
Add regression test for do_not_recommend on a single impl candidate
kulinsky
force-pushed
the
fix-do-not-recomend
branch
from
September 14, 2026 19:00
11b732c to
56aed55
Compare
Contributor
Author
|
Squashed, thanks! |
Contributor
|
r? estebank |
Contributor
|
@bors r+ |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Sep 15, 2026
…tebank Filter do_not_recommend impls before handling a single candidate Fixed rust-lang#160717: a single candidate could appear in the suggestion despite `do_not_recommend`. The `if` block now executes only when there is exactly one implementation candidate and that candidate is not marked `do_not_recommend`. A new test checks both solvers; it fails without the fix and passes with it. These tests passed: - ./x test tests/ui/diagnostic_namespace/do_not_recommend --force-rerun - ./x test tests/ui/try-trait --force-rerun - ./x test tidy Used llm for code navigation.
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 15, 2026
Rollup of 7 pull requests Successful merges: - #160911 (Remove d32 feature from 32-bit Arm targets) - #162771 (Filter do_not_recommend impls before handling a single candidate) - #162779 (rustdoc: Revert "fix bare urls split text") - #161612 (std: make a lot of items crate private) - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate) - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths) - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Sep 15, 2026
…tebank Filter do_not_recommend impls before handling a single candidate Fixed rust-lang#160717: a single candidate could appear in the suggestion despite `do_not_recommend`. The `if` block now executes only when there is exactly one implementation candidate and that candidate is not marked `do_not_recommend`. A new test checks both solvers; it fails without the fix and passes with it. These tests passed: - ./x test tests/ui/diagnostic_namespace/do_not_recommend --force-rerun - ./x test tests/ui/try-trait --force-rerun - ./x test tidy Used llm for code navigation.
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 15, 2026
Rollup of 10 pull requests Successful merges: - #160911 (Remove d32 feature from 32-bit Arm targets) - #162771 (Filter do_not_recommend impls before handling a single candidate) - #162779 (rustdoc: Revert "fix bare urls split text") - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint) - #161612 (std: make a lot of items crate private) - #162204 (Suggest keyword order for `extern "C" const unsafe fn`) - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate) - #162638 (dont suggest changing the mutability of a borrow that comes from a macro) - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths) - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 15, 2026
Rollup of 10 pull requests Successful merges: - #160911 (Remove d32 feature from 32-bit Arm targets) - #162771 (Filter do_not_recommend impls before handling a single candidate) - #162779 (rustdoc: Revert "fix bare urls split text") - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint) - #161612 (std: make a lot of items crate private) - #162204 (Suggest keyword order for `extern "C" const unsafe fn`) - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate) - #162638 (dont suggest changing the mutability of a borrow that comes from a macro) - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths) - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 15, 2026
…uwer Rollup of 12 pull requests Successful merges: - #160911 (Remove d32 feature from 32-bit Arm targets) - #161868 (libtest: never iterate over all tests in `--exact` mode) - #162771 (Filter do_not_recommend impls before handling a single candidate) - #162779 (rustdoc: Revert "fix bare urls split text") - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint) - #161612 (std: make a lot of items crate private) - #162204 (Suggest keyword order for `extern "C" const unsafe fn`) - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate) - #162638 (dont suggest changing the mutability of a borrow that comes from a macro) - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths) - #162654 (Improve Armv7-R documentation) - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 15, 2026
Rollup merge of #162771 - kulinsky:fix-do-not-recomend, r=estebank Filter do_not_recommend impls before handling a single candidate Fixed #160717: a single candidate could appear in the suggestion despite `do_not_recommend`. The `if` block now executes only when there is exactly one implementation candidate and that candidate is not marked `do_not_recommend`. A new test checks both solvers; it fails without the fix and passes with it. These tests passed: - ./x test tests/ui/diagnostic_namespace/do_not_recommend --force-rerun - ./x test tests/ui/try-trait --force-rerun - ./x test tidy Used llm for code navigation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed #160717: a single candidate could appear in the suggestion despite
do_not_recommend.The
ifblock now executes only when there is exactly one implementation candidate and that candidate is not markeddo_not_recommend.A new test checks both solvers; it fails without the fix and passes with it.
These tests passed:
- ./x test tests/ui/diagnostic_namespace/do_not_recommend --force-rerun
- ./x test tests/ui/try-trait --force-rerun
- ./x test tidy
Used llm for code navigation.