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 report too many expr field candidates #100898

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 23, 2022

When considering "this expressions' field has a {field/method}" suggestions:

  1. Don't report methods that are out of scope
  2. Use span_suggestions instead of reporting each field candidate, which caps the number of suggestions to 4
  3. Blacklist some common traits like Clone and Deref

Fixes #100894

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

r? @spastorino

(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 Aug 23, 2022
@compiler-errors
Copy link
Member Author

@rustbot author

@rustbot rustbot 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 Aug 23, 2022
@compiler-errors
Copy link
Member Author

@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 Aug 23, 2022
| +++
LL | t.a3.bar();
| +++
and 6 other candidates
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There we go :)

@spastorino
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 27, 2022

📌 Commit c3f568b has been approved by spastorino

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 Aug 27, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 27, 2022
…ds, r=spastorino

Do not report too many expr field candidates

When considering "this expressions' field has a {field/method}" suggestions:
1. Don't report methods that are out of scope
2. Use `span_suggestions` instead of reporting each field candidate, which caps the number of suggestions to 4
4. Blacklist some common traits like `Clone` and `Deref`

Fixes rust-lang#100894
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…ds, r=spastorino

Do not report too many expr field candidates

When considering "this expressions' field has a {field/method}" suggestions:
1. Don't report methods that are out of scope
2. Use `span_suggestions` instead of reporting each field candidate, which caps the number of suggestions to 4
4. Blacklist some common traits like `Clone` and `Deref`

Fixes rust-lang#100894
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 29, 2022
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#100898 (Do not report too many expr field candidates)
 - rust-lang#101056 (Add the syntax of references to their documentation summary.)
 - rust-lang#101106 (Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items)
 - rust-lang#101131 (CTFE: exposing pointers and calling extern fn is just impossible)
 - rust-lang#101141 (Simplify `get_trait_ref` fn used for `virtual_function_elimination`)
 - rust-lang#101146 (Various changes to logging of borrowck-related code)
 - rust-lang#101156 (Remove `Sync` requirement from lint pass objects)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 091017c into rust-lang:master Aug 30, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 30, 2022
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 12, 2023
@compiler-errors compiler-errors deleted the too-many-expr-fields branch August 11, 2023 20:21
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.

Way too much (unhelpful) help is provided when mistakenly calling .borrow_mut() on a struct
5 participants