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

Suppress type errors that come from private fields #106600

Merged
merged 1 commit into from
Jan 9, 2023

Conversation

compiler-errors
Copy link
Member

Fixes #57320

There was some discussion here (#57320 (comment)), but I honestly think the second error is worth suppressing regardless.

I would be open to feedback though -- perhaps we can suppress the .len() suggestion if there's type error (since we have access to Expectation, we can determine that).

r? @estebank

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2023
@estebank
Copy link
Contributor

estebank commented Jan 8, 2023

I'm ok with this approach.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 8, 2023

📌 Commit 59aa421 has been approved by estebank

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 Jan 8, 2023
@compiler-errors
Copy link
Member Author

@bors rollup

compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jan 9, 2023
…y-err, r=estebank

Suppress type errors that come from private fields

Fixes rust-lang#57320

There was some discussion here (rust-lang#57320 (comment)), but I honestly think the second error is worth suppressing regardless.

I would be open to feedback though -- perhaps we can suppress the `.len()` suggestion if there's type error (since we have access to [`Expectation`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/enum.Expectation.html), we can determine that).

r? `@estebank`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#104163 (Don't derive Debug for `OnceWith` & `RepeatWith`)
 - rust-lang#106131 (Mention "signature" rather than "fn pointer" when impl/trait methods are incompatible)
 - rust-lang#106363 (Structured suggestion for `&mut dyn Iterator` when possible)
 - rust-lang#106497 (Suggest using clone when we have &T and T implemented Clone)
 - rust-lang#106584 (Document that `Vec::from_raw_parts[_in]` must be given a pointer from the correct allocator.)
 - rust-lang#106600 (Suppress type errors that come from private fields)
 - rust-lang#106602 (Add goml scripts to tidy checks)
 - rust-lang#106606 (Do not emit structured suggestion for turbofish with wrong span)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 29420a8 into rust-lang:master Jan 9, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 9, 2023
@compiler-errors compiler-errors deleted the no-private-field-ty-err branch August 11, 2023 20:11
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 message shows type of private field
4 participants