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

Skip pointing out ambiguous impls in alloc/std crates too in inference errors #93469

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

compiler-errors
Copy link
Member

This generalizes the logic in annotate_source_of_ambiguity to skip printing ambiguity errors traits in alloc and std as well, not just core.

While this does spot-fix the issue mentioned below, it would be nicer to generalize this logic, for example to detect when the trait predicate's self_ty has any numerical inference variables. Is it worthwhile to scrap this solution for one like that?

Fixes #93450

r? @estebank
feel free to reassign

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 29, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2022
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

same mir-opt failures cc #93384

@bors
Copy link
Contributor

bors commented Feb 8, 2022

☔ The latest upstream changes (presumably #92007) made this pull request unmergeable. Please resolve the merge conflicts.

@estebank
Copy link
Contributor

r=me after rebase

@estebank estebank changed the title skip pointing out ambuguous impls in alloc/std crates too Skip pointing out ambiguous impls in alloc/std crates too in inference errors Feb 17, 2022
@compiler-errors
Copy link
Member Author

Rebased and ready for r+

@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2022
@apiraino
Copy link
Contributor

@compiler-errors was this PR already approved pending the rebase (comment)?
Do we need to nudge rustbot somehow? 🤔

@compiler-errors
Copy link
Member Author

@apiraino no, it was not approved before rebase. it just needs bors approval.

@estebank do you mind giving an r+? thanks!

@estebank
Copy link
Contributor

@bors r+

@compiler-errors
Copy link
Member Author

@bors r=estebank

@bors
Copy link
Contributor

bors commented Mar 27, 2022

📌 Commit 9072c8d has been approved by estebank

@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 Mar 27, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#91981 (Recover suggestions and useful information lost in previous PR)
 - rust-lang#93469 (Skip pointing out ambiguous impls in alloc/std crates too in inference errors)
 - rust-lang#95335 (Move resolve_path to rustc_builtin_macros and make it private)
 - rust-lang#95340 (interpret: with enforce_number_validity, ensure integers are truly Scalar::Int (i.e., no pointers))
 - rust-lang#95341 (ARMv6K Horizon OS has_thread_local support)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c6bb219 into rust-lang:master Mar 27, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 27, 2022
@compiler-errors compiler-errors deleted the issue-93450 branch April 7, 2022 04:34
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.

Error output regression: spurious integer inference error that only occurs if another error occurs
8 participants