Skip to content
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

Do not suggest wrapping an item if it has ambiguous un-imported methods #94237

Merged

Conversation

compiler-errors
Copy link
Member

If the method is defined for the receiver we have, but is ambiguous during probe, then it probably comes from one of several traits that just weren't used. Don't suggest wrapping the receiver in Box/etc., even if that makes the method probe unambiguous.

Fixes #94218

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 22, 2022
@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 22, 2022
@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Feb 22, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 22, 2022

📌 Commit 0626919 has been approved by lcnr

@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 Feb 22, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#94169 (Fix several asm! related issues)
 - rust-lang#94178 (tidy: fire less "ignoring file length unneccessarily" warnings)
 - rust-lang#94179 (solarish current_exe using libc call directly)
 - rust-lang#94196 (compiletest: Print process output info with less whitespace)
 - rust-lang#94208 (Add the let else tests found missing in the stabilization report)
 - rust-lang#94237 (Do not suggest wrapping an item if it has ambiguous un-imported methods)
 - rust-lang#94246 (ScalarMaybeUninit is explicitly hexadecimal in its formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 396910a into rust-lang:master Feb 22, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 22, 2022
@compiler-errors compiler-errors deleted the dont-wrap-ambiguous-receivers branch April 7, 2022 04:33
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 suggests wrapping receivers even if it wouldn't immediately help method resolution
6 participants