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

On missing method do not suggest private traits #47534

Merged
merged 1 commit into from
Jan 25, 2018

Conversation

estebank
Copy link
Contributor

When encountering a method call for an ADT that doesn't have any
implementation of it, we search for traits that could be implemented
that do have that method. Filter out private non-local traits that would
not be able to be implemented.

This doesn't account for public traits that are in a private scope, but
works as a first approximation and is a more correct behavior than the
current one.

Fix #45781.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@estebank estebank force-pushed the suggest-public-traits branch from 4da2257 to 530c9c9 Compare January 18, 2018 04:19
@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2018
@estebank estebank changed the title Do not suggest private traits that have missing method On missing method do not suggest private traits Jan 18, 2018
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 18, 2018

📌 Commit 530c9c9 has been approved by petrochenkov

@petrochenkov petrochenkov 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 Jan 18, 2018
@bors
Copy link
Contributor

bors commented Jan 22, 2018

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

When encountering a method call for an ADT that doesn't have any
implementation of it, we search for traits that could be implemented
that do have that method. Filter out private non-local traits that would
not be able to be implemented.

This doesn't account for public traits that are in a private scope, but
works as a first approximation and is a more correct behavior than the
current one.
@estebank estebank force-pushed the suggest-public-traits branch from 530c9c9 to 4121ddb Compare January 22, 2018 16:29
@estebank
Copy link
Contributor Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Jan 22, 2018

📌 Commit 4121ddb has been approved by petrochenkov

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 25, 2018
…etrochenkov

On missing method do not suggest private traits

When encountering a method call for an ADT that doesn't have any
implementation of it, we search for traits that could be implemented
that do have that method. Filter out private non-local traits that would
not be able to be implemented.

This doesn't account for public traits that are in a private scope, but
works as a first approximation and is a more correct behavior than the
current one.

Fix rust-lang#45781.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 25, 2018
…etrochenkov

On missing method do not suggest private traits

When encountering a method call for an ADT that doesn't have any
implementation of it, we search for traits that could be implemented
that do have that method. Filter out private non-local traits that would
not be able to be implemented.

This doesn't account for public traits that are in a private scope, but
works as a first approximation and is a more correct behavior than the
current one.

Fix rust-lang#45781.
bors added a commit that referenced this pull request Jan 25, 2018
Rollup of 10 pull requests

- Successful merges: #47534, #47609, #47679, #47691, #47700, #47702, #47717, #47721, #47726, #47729
- Failed merges:
@bors bors merged commit 4121ddb into rust-lang:master Jan 25, 2018
@estebank estebank deleted the suggest-public-traits branch November 9, 2023 05:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants